﻿:root {
    --color-background: #F6F8F7; /* Cultured (light grayish green-white) */
    --color-surface: #ffffff; /* White */
    --color-text-primary: #000000; /* Black */
    --color-text-secondary: #555555; /* Davy’s gray */
    --color-border: #cccccc; /* Chinese silver */
    --color-muted: #888888; /* Gray (medium) */
    --color-danger: #DF4545; /* Fire opal / soft red */
    --color-hover: #eaeaea; /* Platinum */
    --color-neutral-light: #f5f5f5; /* White smoke */
    --color-shadow: rgba(0, 0, 0, 0.05); /* Transparent black (very light shadow) */
}

.Content {
    background-color: var(--color-background);
}

#adsList,
#adsList .ad-item,
#adsList .ad-drag-handle {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.ads-section {
    margin-block: 60px;
    background-color: var(--color-surface);
    padding: 16px;
    border-radius: 8px;
    color: var(--color-text-primary);
}

.ad-heading h2 {
    font-weight: bold;
}

.ad-heading p {
    font-weight: 600;
}

.counter-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .counter-section input {
        width: 100px;
        text-align: center;
    }

    .counter-section label {
        margin-bottom: 0px;
        font-weight: 600;
    }

@media (max-width: 768px) {
    .counter-section {
        flex-direction: column;
    }
}

.ad-item {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    margin-bottom: 10px;
    box-shadow: 0 1px 3px var(--color-shadow);
    padding-block: 30px;
}

.ad-drag-handle {
    flex-shrink: 0;
    cursor: grab;
    color: var(--color-muted);
    font-size: 18px;
}

.ad-link-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 32px;
}

    .ad-link-group label {
        white-space: nowrap;
        font-weight: 600;
        color: var(--color-text-secondary);
        margin-bottom: 0px;
    }

    .ad-link-group input {
        width: 100%;
        padding: 8px 10px;
        border: 1px solid var(--color-border);
        border-radius: 4px;
        font-size: 14px;
    }

.ad-upload {
    flex-shrink: 0;
}

.btn-upload {
    padding: 8px 12px;
    background-color: var(--color-neutral-light);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

    .btn-upload:hover {
        background-color: var(--color-hover);
    }

.ad-remove {
    flex-shrink: 0;
    border: none;
    background: none;
    color: var(--color-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

    .ad-remove:hover {
        color: var(--color-danger);
    }

.uploaded-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .uploaded-section img {
        width: 200px;
        max-width: 100%;
        height: auto;
        display: block;
    }

    .uploaded-section button {
        padding: 0;
        background: transparent;
        border: none;
        color: var(--color-danger);
    }

.control-section {
    text-align: center;
}

@media (max-width: 768px) {
    .uploaded-section {
        justify-content: center;
        align-items: center;
    }

    .ad-item {
        height: auto;
        padding-top: 5px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ad-drag-handle {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .lg-hide {
        display: block !important;
    }

    .ad-link-group {
        flex-direction: column;
        gap: 10px;
    }

        .ad-link-group label {
            margin-bottom: 2px;
        }

    .ad-upload,
    .ad-remove {
        align-self: flex-end;
    }

    .ad-upload,
    .btn-upload {
        width: 100%;
    }

    .ad-remove {
        display: none;
    }
}

.lg-hide {
    display: none;
}

.ad-rotator {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.ad-rotator__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 1;
    overflow: hidden;
    background: none !important;
}

    .ad-rotator__frame::before {
        content: none !important;
    }

    .ad-rotator__frame img,
    .ad-rotator__frame iframe.ad-iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 8px;
        object-fit: cover;
        opacity: 0;
        transition: opacity 0.6s ease-in-out;
        z-index: 0;
    }

        .ad-rotator__frame img.is-active,
        .ad-rotator__frame iframe.ad-iframe.is-active {
            opacity: 1;
            z-index: 1;
        }

    .ad-rotator__frame img,
    .ad-rotator__frame iframe.ad-iframe {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

@media (min-width: 769px) {
    .ad-rotator {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .ad-rotator {
        width: 100%;
    }
}

.pb-32 {
    padding-bottom: 32px;
}

.dragging {
    opacity: 0.7;
}

.ad-drag-handle {
    cursor: grab;
}

    .ad-drag-handle:active {
        cursor: grabbing;
    }