/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.twz-ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    align-items: start;
}

.twz-ad-grid-item .twz-ad {
    margin: 0;
}

.twz-ad[data-twz-responsive-images="1"] img,
.twz-ad-placeholder[data-twz-responsive-images="1"] img {
    max-width: 100%;
    height: auto;
}

.twz-adblock-overlay {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.7);
}

.twz-adblock-overlay > div {
    max-width: 520px;
    padding: 24px;
    background: #fff;
    color: #1d2327;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1.5;
    text-align: center;
}

.twz-placement-align-left {
    text-align: left;
}

.twz-placement-align-center {
    text-align: center;
}

.twz-placement-align-right {
    text-align: right;
}

.twz-placement-clearfix::after {
    content: "";
    display: block;
    clear: both;
}

.twz-parallax-container {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 320px;
}

.twz-parallax-clip {
    position: absolute;
    inset: 0;
    clip-path: inset(0);
}

.twz-parallax-inner {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.twz-parallax-inner .twz-ad {
    pointer-events: auto;
}

.twz-sticky-placement {
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
}

.twz-sticky-placement.twz-sticky-sticky_header,
.twz-sticky-placement.twz-sticky-sticky_footer {
    padding: 6px 12px;
}

.twz-sticky-placement img {
    max-width: 100%;
    height: auto;
}

.twz-sticky-close {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    font: 700 14px/1 Arial, sans-serif;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    appearance: none;
}

.twz-sticky-close:hover,
.twz-sticky-close:focus {
    background: #0f172a;
    color: #fff;
    outline: none;
}

.twz-sticky-close-right {
    right: 6px;
}

.twz-sticky-close-left {
    left: 6px;
}

.twz-sticky-close-inside {
    top: 6px;
}

.twz-sticky-close-outside {
    top: -22px;
}

.twz-sticky-sticky_header .twz-sticky-close-outside {
    top: auto;
    bottom: -22px;
}

@media (max-width: 782px) {
    .twz-sticky-sticky_left_window,
    .twz-sticky-sticky_right_window,
    .twz-sticky-sticky_left_sidebar,
    .twz-sticky-sticky_right_sidebar {
        left: 12px !important;
        right: 12px !important;
        top: auto !important;
        bottom: 12px !important;
        width: auto !important;
        transform: none !important;
    }
}

.twz-ad-upload-panel {
    max-width: 760px;
    margin: 0 0 40px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.twz-ad-upload-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.twz-ad-upload-head h3 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.2;
    color: #0f172a;
}

.twz-ad-upload-head p {
    margin: 0;
    color: #64748b;
}

.twz-ad-upload-head > span {
    flex: 0 0 auto;
    max-width: 220px;
    padding: 7px 10px;
    border: 1px solid #c7d2fe;
    color: #1d4ed8;
    background: #eef2ff;
    font-size: 13px;
    line-height: 1.2;
}

.twz-ad-upload-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 18px;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.twz-ad-upload-status p {
    margin: 8px 0 0;
    color: #64748b;
}

.twz-ad-upload-status-badge,
.twz-account-ad-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.twz-ad-upload-status-live,
.twz-account-ad-status-live {
    border-color: #16a34a;
    background: #ecfdf3;
    color: #166534;
}

.twz-ad-upload-status-scheduled,
.twz-account-ad-status-scheduled {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.twz-ad-upload-status-waiting-review,
.twz-account-ad-status-waiting-review {
    border-color: #d97706;
    background: #fffbeb;
    color: #92400e;
}

.twz-ad-upload-status-rejected,
.twz-account-ad-status-rejected {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.twz-ad-upload-status-ended,
.twz-ad-upload-status-ended-limit,
.twz-account-ad-status-ended,
.twz-account-ad-status-ended-limit {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.twz-account-ad-status + small {
    display: block;
    margin-top: 5px;
    color: #64748b;
}

.twz-account-ad-status-detail {
    display: block;
    color: #64748b;
    font-size: 14px;
    line-height: 1.35;
}

.twz-account-ad-status-detail-live {
    color: #64748b;
}

.twz-account-ad-status-detail-rejected,
.twz-account-ad-status-detail-ended,
.twz-account-ad-status-detail-ended-limit {
    color: #991b1b;
}

.twz-account-ad-status-detail + small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.twz-account-ads {
    margin: 0 0 32px;
}

.twz-account-ads-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
}

.twz-account-ads-head h3 {
    margin: 0;
}

.twz-account-ad-tabs {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin: 0 0 18px;
    padding: 10px;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.twz-account-ad-tabs a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 14px;
    color: #334155;
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
}

.twz-account-ad-tabs a::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: -10px;
    left: 12px;
    height: 3px;
    background: transparent;
}

.twz-account-ad-tabs a:hover,
.twz-account-ad-tabs a:focus,
.twz-account-ad-tabs a.is-active {
    color: #0f172a;
    background: #f8fafc;
}

.twz-account-ad-tabs a.is-active::after {
    background: #2563eb;
}

.twz-account-ad-tabs em {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-style: normal;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

.twz-account-ad-tabs a.is-active em {
    background: #dbeafe;
    color: #1d4ed8;
}

.twz-account-ads-table {
    overflow: hidden;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.twz-ad-upload-limit-list {
    display: grid;
    gap: 10px;
}

.twz-ad-upload-limit > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 13px;
}

.twz-ad-upload-limit strong {
    color: #0f172a;
}

.twz-ad-upload-limit em {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.twz-ad-upload-limit i {
    display: block;
    height: 100%;
    background: #2563eb;
}

.twz-ad-upload-form {
    padding: 24px;
}

.twz-ad-upload-fields {
    margin: 0;
    padding: 0;
    border: 0;
}

.twz-ad-upload-fields:disabled {
    opacity: 1;
}

.twz-ad-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.twz-ad-upload-placement {
    margin: 0 0 14px;
    border: 1px solid #dbe4f0;
    background: #fff;
}

.twz-ad-upload-placement:last-of-type {
    margin-bottom: 0;
}

.twz-ad-upload-placement summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.twz-ad-upload-placement summary::-webkit-details-marker {
    display: none;
}

.twz-ad-upload-placement summary::after {
    content: "+";
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 22px;
    line-height: 1;
}

.twz-ad-upload-placement[open] summary {
    border-bottom: 1px solid #dbe4f0;
}

.twz-ad-upload-placement[open] summary::after {
    content: "-";
}

.twz-ad-upload-placement summary em {
    margin-left: auto;
    color: #15803d;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
}

.twz-ad-upload-placement .twz-ad-upload-grid {
    padding: 18px;
}

.twz-ad-upload-stats {
    margin: 18px;
    padding: 16px;
    border: 1px solid #dbe4f0;
    background: #f8fafc;
}

.twz-ad-upload-stats-total {
    margin: 18px 0 0;
    background: #fff;
}

.twz-ad-upload-report-controls {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
}

.twz-ad-upload-report-controls label {
    margin: 0;
}

.twz-ad-upload-report-controls input[type="date"] {
    min-height: 38px;
    width: 155px;
}

.twz-ad-upload-report-controls a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #2563eb;
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}

.twz-ad-upload-stats-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.twz-ad-upload-stats-head strong {
    color: #0f172a;
    font-size: 15px;
}

.twz-ad-upload-stats-head span {
    color: #64748b;
    font-size: 13px;
}

.twz-ad-upload-stats-chart {
    height: 130px;
    margin-bottom: 12px;
}

.twz-ad-upload-stats:not(.twz-ad-upload-stats-total) .twz-ad-upload-stats-chart {
    height: 96px;
}

.twz-ad-upload-stats-chart svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.twz-ad-upload-stats-grid {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.twz-ad-upload-stats-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.twz-ad-upload-stats-impressions {
    stroke: #2271b1;
}

.twz-ad-upload-stats-clicks {
    stroke: #d63638;
}

.twz-ad-upload-stats-end-label {
    font: 700 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.twz-ad-upload-stats-end-impressions {
    fill: #2271b1;
}

.twz-ad-upload-stats-end-clicks {
    fill: #d63638;
}

.twz-ad-upload-stats-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.twz-ad-upload-stats-summary span {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    line-height: 1.25;
}

.twz-ad-upload-stats-total .twz-ad-upload-stats-summary span {
    background: #f8fafc;
}

.twz-ad-upload-stats-summary strong {
    display: block;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.15;
}

.twz-ad-upload-timeline {
    margin: 18px 0 0;
    padding: 14px;
    border: 1px solid #dbe4f0;
    background: #fff;
}

.twz-ad-upload-timeline > strong {
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
}

.twz-ad-upload-timeline > div {
    padding: 9px 0 9px 12px;
    border-left: 3px solid #2271b1;
}

.twz-ad-upload-timeline > div + div {
    margin-top: 8px;
}

.twz-ad-upload-timeline span {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.twz-ad-upload-timeline p {
    margin: 3px 0 0;
    color: #334155;
}

.twz-ad-upload-form label {
    display: block;
    margin: 0;
}

.twz-ad-upload-form label > span {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.twz-ad-upload-form input[type="text"],
.twz-ad-upload-form input[type="email"],
.twz-ad-upload-form input[type="url"],
.twz-ad-upload-form select,
.twz-ad-upload-form textarea,
.twz-ad-upload-form input:not([type]) {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.35;
    box-sizing: border-box;
}

.twz-ad-upload-form textarea {
    min-height: 160px;
    resize: vertical;
}

.twz-ad-upload-wide,
.twz-ad-upload-requirements,
.twz-ad-upload-current-image,
.twz-ad-upload-file,
.twz-ad-upload-actions {
    grid-column: 1 / -1;
}

.twz-ad-upload-requirements {
    margin: -4px 0 0;
}

.twz-ad-upload-rule {
    display: none;
    padding: 13px 15px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}

.twz-ad-upload-rule.is-active {
    display: block;
}

.twz-ad-upload-rule strong,
.twz-ad-upload-rule span {
    display: block;
}

.twz-ad-upload-rule strong {
    margin-bottom: 4px;
    color: #1e293b;
}

.twz-ad-upload-file {
    padding: 16px;
    border: 1px dashed #94a3b8;
    background: #f8fafc;
}

.twz-ad-upload-current-image {
    padding: 16px;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.twz-ad-upload-current-image strong {
    display: block;
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 14px;
}

.twz-ad-upload-current-image img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 280px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.twz-ad-upload-live-preview {
    padding: 12px;
    border: 1px solid #dbe4f0;
    background: #f8fafc;
}

.twz-ad-upload-live-preview strong {
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
}

.twz-ad-upload-preview-frame {
    min-height: 78px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px dashed #cbd5e1;
    background: #fff;
    color: #64748b;
}

.twz-ad-upload-preview-frame img {
    display: block;
    max-width: 100%;
    height: auto;
}

.twz-ad-upload-preview-frame pre {
    width: 100%;
    max-height: 160px;
    margin: 0;
    padding: 12px;
    overflow: auto;
    white-space: pre-wrap;
    color: #0f172a;
    background: #fff;
}

.twz-ad-upload-placement .twz-ad-upload-html-only {
    display: none;
}

.twz-ad-upload-placement[data-twz-ad-type="plain"] .twz-ad-upload-image-only,
.twz-ad-upload-placement[data-twz-ad-type="html"] .twz-ad-upload-image-only {
    display: none;
}

.twz-ad-upload-placement[data-twz-ad-type="plain"] .twz-ad-upload-html-only,
.twz-ad-upload-placement[data-twz-ad-type="html"] .twz-ad-upload-html-only {
    display: block;
}

.twz-ad-upload-placement[data-twz-ad-type="image"] .twz-ad-upload-rule {
    display: block;
}

.twz-ad-upload-file input[type="file"] {
    width: 100%;
}

.twz-ad-upload-actions {
    margin-top: 22px;
}

.twz-ad-upload-actions button,
.twz-ad-upload-form button[type="submit"] {
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    background: #0f7ad7;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    cursor: pointer;
}

.twz-ad-upload-actions button:hover,
.twz-ad-upload-form button[type="submit"]:hover {
    background: #075da8;
}

.twz-ad-upload-error,
.twz-ad-upload-success,
.twz-ad-upload-notice {
    max-width: 760px;
    padding: 14px 16px;
    border-left: 4px solid;
    background: #fff;
}

.twz-ad-upload-error {
    border-color: #dc2626;
    color: #991b1b;
}

.twz-ad-upload-success {
    border-color: #16a34a;
    color: #166534;
}

.twz-ad-upload-notice {
    margin: 0 0 18px;
    border-color: #2563eb;
    color: #1e3a8a;
}

.twz-placement-debug-wrap {
    position: relative;
    margin: 10px 0;
    padding: 24px 8px 8px;
    outline: 2px solid #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.twz-placement-debug-label {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 3px 8px;
    background: #2563eb;
    color: #fff;
    font: 700 12px/1.4 Arial, sans-serif;
}

.twz-placement-debug-empty {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #2563eb;
    color: #1d4ed8;
    font: 600 13px/1.4 Arial, sans-serif;
}

@media (max-width: 720px) {
    .twz-ad-upload-panel {
        max-width: 100%;
    }

    .twz-ad-upload-head,
    .twz-ad-upload-form {
        padding: 18px;
    }

    .twz-ad-upload-head {
        display: block;
    }

    .twz-ad-upload-head > span {
        display: inline-block;
        margin-top: 12px;
        max-width: 100%;
    }

    .twz-ad-upload-status {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .twz-ad-upload-grid {
        grid-template-columns: 1fr;
    }

    .twz-ad-upload-stats-head,
    .twz-ad-upload-stats-summary {
        grid-template-columns: 1fr;
    }

    .twz-ad-upload-stats-head {
        display: block;
    }

    .twz-ad-upload-stats-head span {
        display: block;
        margin-top: 4px;
    }
}
