/**
 * Plugin Name: Zeal Ad Manager
 * Author:      Edu Brazeal
 * Author URI:  https://banter.ng
 * Version:     1.0.0
 */

/**
 * TABLE OF CONTENTS
 * --------------------------------------------------------------------------
 * 1.0 - General Layout & Structure
 * 2.0 - Navigation
 * 2.1 - Desktop Navigation
 * 2.2 - Mobile Sticky Navigation
 * 3.0 - Cards & Content Panels
 * 4.0 - Forms, Fields & Buttons
 * 5.0 - Tables
 * 6.0 - Ad Preview Templates (Dashboard & Modal)
 * 6.1 - Common Preview Styles
 * 6.2 - Spotlight Preview
 * 6.3 - Story Preview
 * 6.4 - Banner Preview
 * 7.0 - Live Ad Unit Styles (Publisher Sites)
 * 7.1 - General Ad Unit Container
 * 7.2 - Spotlight Ad Unit
 * 7.3 - Story Ad Unit
 * 7.4 - Banner Ad Unit
 * 7.5 - ZealUp Vignette Ad Unit
 * 7.6 - ZealUp Anchor Ad
 * 7.7 - ZealUp Sticky Bar
 * 8.0 - Modals & Popups
 * 8.1 - General Modal Styles
 * 8.2 - Modal Content (Budget, Ad Code)
 * 9.0 - Components
 * 9.1 - Notifications
 * 9.2 - Action Menu Dropdown
 * 9.3 - Sponsored Tooltip
 * 9.4 - Login Form Wrapper
 * 9.5 - Registration Form
 * 9.6 - Utility Classes
 * 9.7 - Publisher Earnings Components
 * 10.0 - Responsive Design
 * 10.1 - Tablet & Small Desktop
 * 10.2 - Mobile Devices
 * --------------------------------------------------------------------------
 */


/* --- 1.0 - General Layout & Structure --- */
.zam-dashboard-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
@media (min-width: 1024px) {
    .zam-dashboard-wrapper {
    }
}


/* --- 2.0 - Navigation --- */
.zam-dashboard-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zam-dashboard-nav ul li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    margin-bottom: 5px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.zam-dashboard-nav ul li a:hover {
    background-color: #e9e9e9;
    color: #000;
}

.zam-dashboard-nav ul li.zam-is-active a {
    background-color: #4A90E2;
    color: #fff;
}

/* --- 2.1 - Desktop Navigation --- */
@media screen and (min-width: 783px) {
    .zam-dashboard-nav {
        background-color: #f9f9f9;
        border: 1px solid #e0e0e0;
        padding: 20px;
        border-radius: 8px;
    }
    .zam-dashboard-nav ul li a {
        display: flex;
        align-items: center;
    }
    .zam-dashboard-nav .dashicons {
        margin-right: 8px;
        font-size: 20px;
        height: 20px;
        width: 20px;
    }
}

/* --- 2.2 - Mobile Sticky Navigation --- */
@media screen and (max-width: 782px) {
    .zam-dashboard-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
        z-index: 1000;
        padding: 5px 0;
        border-radius: 0;
        border-right: none;
        border-left: none;
        border-bottom: none;
    }
    .zam-dashboard-nav ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    .zam-dashboard-nav ul li {
        flex: 1;
        text-align: center;
    }
    .zam-dashboard-nav ul li a {
        padding: 8px 5px;
        margin-bottom: 0;
        border-radius: 0;
        background-color: transparent !important;
        color: #555;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .zam-dashboard-nav ul li.zam-is-active a {
        color: #4A90E2;
    }
    .zam-dashboard-nav .zam-nav-label {
        display: none;
    }
    .zam-dashboard-nav .dashicons {
        font-size: 28px;
        width: auto;
        height: auto;
    }
}


/* --- 3.0 - Cards & Content Panels --- */
.zam-dashboard-content {
    padding: 1px;
}

.zam-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.zam-card h2, .zam-card h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.zam-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.zam-card-header h2 {
    margin: 0;
    padding: 0;
    border: none;
}

.zam-create-ad-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 30px;
}

.zam-form-main-column,
.zam-ad-preview-area {
    min-width: 0;
}

.zam-ad-preview-area {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.zam-ad-preview-area h3 {
    text-align: center;
    color: #495057;
}


/* --- 4.0 - Forms, Fields & Buttons --- */
.zam-form .zam-form-row {
    margin-bottom: 20px;
}

.zam-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.zam-form label.zam-checkbox-label {
    display: inline-block;
    margin-right: 15px;
    font-weight: 400;
}

.zam-form input[type="text"],
.zam-form input[type="url"],
.zam-form input[type="number"],
.zam-form input[type="file"],
.zam-form select,
.zam-form textarea {
    width: 100%;
    max-width: 450px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}

.zam-form textarea {
    max-width: 100%;
}

.zam-checkbox-grid {
    background-color: #fdfdfd;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.zam-form .zam-form-description {
    font-size: 13px;
    color: #777;
    margin-top: 5px;
}

.zam-date-fields {
    display: flex;
    gap: 20px;
}

.zam-date-fields > div {
    flex: 1;
}

.zam-date-fields input[type="date"] {
    max-width: 100%;
}

.zam-button {
    background-color: #4A90E2;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}

.zam-button.zam-submit-button {
    margin-top: 20px;
}

.zam-button:hover {
    background-color: #357ABD;
    color: #fff;
}

.zam-button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

.zam-button-secondary {
    background-color: #4A90E2;
    color: #fff;
    border: none;
    padding: 10px 10px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}

.zam-button-secondary:hover {
    background-color: #555;
}


/* --- 5.0 - Tables --- */
.zam-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.zam-table th,
.zam-table td {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.zam-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #444;
}

.zam-table tbody tr:hover {
    background-color: #f5f5f5;
}

.zam-table .zam-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.zam-table .status-pending,
.zam-table .status-draft { background-color: #fef3c7; color: #92400e; }

.zam-table .status-active,
.zam-table .status-publish { background-color: #d1fae5; color: #065f46; }

.zam-table .status-rejected,
.zam-table .status-exhausted { background-color: #fee2e2; color: #991b1b; }


/* --- 6.0 - Ad Preview Templates (Dashboard & Modal) --- */
/* --- 6.1 - Common Preview Styles --- */
.zam-ad-preview-template {
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    transition: all 0.3s ease-in-out;
}

.zam-sponsored-tag {
    position: absolute;
    top: 2px;
    right: 3px;
    background: bisque;
    color: darkorange;
    padding: 1px 3px;
    font-size: 14px;
    border-radius: 3px;
    font-weight: 500;
    z-index: 3;
}

.zam-preview-img-element,
.zam-preview-video-element,
.zam-ad-preview-template img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zam-preview-headline,
.zam-preview-description {
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zam-preview-headline {
    -webkit-line-clamp: 1;
}

.zam-preview-description {
    -webkit-line-clamp: 2;
}

/* --- 6.2 - Spotlight Preview --- */
#zam-preview-spotlight, .zam-preview-spotlight-modal {
    width: 300px;
    height: 250px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.zam-preview-spotlight-media {
    height: 150px;
    width: 100%;
    background-color: #e9ecef;
    position: relative;
}

.zam-video-mute-button {
    position: absolute;
    bottom: 5px;
    left: 90%;
    z-index: 2;
    background-color: rgba(0,0,0,0.4);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.zam-video-mute-button:hover {
    background-color: rgba(0,0,0,0.7);
}

.zam-preview-spotlight-content {
    padding: 10px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.zam-preview-spotlight-content .zam-preview-headline {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.zam-preview-spotlight-content .zam-preview-description {
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    margin: 4px 0 8px;
}

.zam-preview-spotlight-content .zam-preview-url-display {
    font-size: 12px;
    color: #555;
    margin-top: auto;
}

/* --- 6.3 - Story Preview --- */
#zam-preview-story, .zam-preview-story-modal {
    width: 300px;
    height: 500px;
}

.zam-preview-story-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #ced4da;
    z-index: 1;
}

.zam-preview-story-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    color: #fff;
    z-index: 2;
}

.zam-preview-story-overlay .zam-preview-headline {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.zam-preview-story-overlay .zam-preview-description {
    font-size: 14px;
    line-height: 1.4;
    color: #eee;
    opacity: 0.9;
    margin-top: 8px;
}

.zam-preview-story-cta {
    display: block;
    margin-top: 15px;
    background-color: #fff;
    color: #111;
    text-align: center;
    padding: 12px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
}

/* --- 6.4 - Banner Preview --- */
#zam-preview-banner, .zam-preview-banner-modal {
    width: 728px;
    max-width: 100%;
    height: 90px;
    background-color: #fdfdfd;
    display: flex;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.zam-preview-banner-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
    background-color: #e9ecef;
}

.zam-preview-banner-content {
    flex-grow: 1;
    margin: 0 15px;
    min-width: 0;
}

.zam-preview-banner-content .zam-preview-headline {
    font-size: 17px;
    font-weight: 600;
    color: #222;
}

.zam-preview-banner-content .zam-preview-description {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}


/* --- 7.0 - Live Ad Unit Styles (Publisher Sites) --- */
/* --- 7.1 - General Ad Unit Container --- */
.zeal-ad-unit {
    display: none;
    margin: 15px auto;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-decoration: none;
    color: #333;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: none;
}

.zeal-ad-unit * {
    box-sizing: border-box;
}

.zeal-ad-unit.zam-ad-template-spotlight {
    width: 300px;
    height: 250px;
}

.zeal-ad-unit.zam-ad-template-story {
    width: 300px;
    height: 500px;
}

.zeal-ad-unit.zam-ad-template-banner {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

.zeal-ad-unit .zam-ad-headline,
.zeal-ad-unit .zam-ad-description {
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zeal-ad-unit .zam-ad-headline {
    -webkit-line-clamp: 1;
}

.zeal-ad-unit .zam-ad-description {
    -webkit-line-clamp: 2;
}

.zeal-ad-unit .zam-ad-image,
.zeal-ad-unit .zam-ad-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

/* --- 7.2 - Spotlight Ad Unit --- */
.zeal-ad-unit.zam-ad-template-spotlight {
    display: flex;
    flex-direction: column;
}

.zeal-ad-unit.zam-ad-template-spotlight .zam-ad-spotlight-media {
    height: 150px;
    width: 100%;
    background-color: #e9ecef;
    position: relative;
}

.zeal-ad-unit.zam-ad-template-spotlight .zam-ad-spotlight-content {
    padding: 10px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.zeal-ad-unit.zam-ad-template-spotlight .zam-ad-headline {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.zeal-ad-unit.zam-ad-template-spotlight .zam-ad-description {
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    margin: 4px 0 8px;
}

.zeal-ad-unit.zam-ad-template-spotlight .zam-ad-url-display {
    font-size: 12px;
    color: darkred;
    margin-top: auto;
}

/* --- 7.3 - Story Ad Unit --- */
.zeal-ad-unit.zam-ad-template-story .zam-ad-story-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.zeal-ad-unit.zam-ad-template-story .zam-ad-story-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    color: #fff;
    z-index: 2;
}

.zeal-ad-unit.zam-ad-template-story .zam-ad-headline {
	color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.zeal-ad-unit.zam-ad-template-story .zam-ad-description {
    font-size: 14px;
    line-height: 1.4;
    color: #eee;
    opacity: 0.9;
    margin-top: 8px;
}

.zeal-ad-unit.zam-ad-template-story .zam-ad-story-cta {
    display: block;
    margin-top: 15px;
    background-color: #fff;
    color: #111;
    text-align: center;
    padding: 12px;
    border-radius: 25px;
    font-weight: 600;
}

/* --- 7.4 - Banner Ad Unit --- */
.zeal-ad-unit.zam-ad-template-banner {
    display: flex !important;
    align-items: center !important;
}


.zeal-ad-unit.zam-ad-template-banner .zam-ad-banner-image-wrapper {
    width: 80px;
    height: 80px;
    margin-left: 5px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
    background-color: #e9ecef;
}

.zeal-ad-unit.zam-ad-template-banner .zam-ad-banner-content {
    flex-grow: 1;
    margin: 0 15px;
    min-width: 0;
}

.zeal-ad-unit.zam-ad-template-banner .zam-ad-headline {
    font-size: 17px;
    font-weight: 600;
    color: #222;
}

.zeal-ad-unit.zam-ad-template-banner .zam-ad-description {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* --- 7.5 - ZealUp Vignette Ad Unit --- */
.zealup-vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    visibility: hidden;
}

.zealup-vignette-overlay.zealup-is-visible {
    opacity: 1;
    visibility: visible;
}

.zealup-vignette-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    padding: 20px;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
}

.zealup-vignette-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1px;
    padding-bottom: 1px;
    border-bottom: 1px solid #eee;
}

.zealup-vignette-brand {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-right: auto;
}

.zealup-vignette-close {
    padding: 5px;
    font-size: 32px;
    line-height: 1;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 300;
}
.zealup-vignette-close:hover {
    color: #000;
}

.zealup-vignette-ad-wrapper {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zealup-vignette-ad-wrapper .zeal-ad-unit {
    margin: 0;
}

@media screen and (min-width: 768px) {
    .zealup-vignette-container {
        padding: 5px;
    }

    .zealup-vignette-container .zam-ad-template-spotlight {
        transform: scale(1.4);
        margin: 40px;
    }

    .zealup-vignette-container .zam-ad-template-banner {
        height: 350px;
        max-width: 728px;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }
    .zealup-vignette-container .zam-ad-template-banner .zam-ad-banner-image-wrapper {
        width: 280px;
        height: 280px;
        margin: 0 5px 0 0;
        flex-shrink: 0;
    }
    .zealup-vignette-container .zam-ad-template-banner .zam-ad-banner-content {
        text-align: left;
    }
    .zealup-vignette-container .zam-ad-template-banner .zam-ad-headline {
        font-size: 34px;
        -webkit-line-clamp: 2;
    }
    .zealup-vignette-container .zam-ad-template-banner .zam-ad-description {
        font-size: 20px;
        -webkit-line-clamp: 3;
    }
}

/* --- 7.6 - ZealUp Anchor Ad --- */
.zealup-anchor-ad {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99998;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.zealup-anchor-ad.zealup-is-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.zealup-anchor-ad .zeal-ad-unit {
    margin: 0;
}

/* --- 7.7 - ZealUp Sticky Bar --- */
@media screen and (min-width: 1024px) {
    .zealup-sticky-bar.zealup-is-visible {
        border-radius: 12px;
        left: 25%;
    }
}
    
.zealup-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    max-width: 740px;
    width: 100%;
    z-index: 99997;
    background-color: #ddd;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    padding: 3px 0;
}

.zealup-sticky-bar.zealup-is-visible {
    display: block;
    transform: translateY(0);
}

.zealup-sticky-bar-inner {
    width: 100%;
    max-width: 728px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zealup-sticky-bar .zealup-ad-wrapper {
    width: 100%;
}

.zealup-sticky-bar .zeal-ad-unit {
    margin: 0;
    box-shadow: none;
    border: 1px solid #eee;
    width: 100%;
}

/* --- Robust Close Buttons --- */
.zealup-anchor-close,
.zealup-sticky-close {
    position: absolute;
    width: 28px;
    height: 28px;
    background-color: #333;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
    z-index: 10;
}

.zealup-anchor-close:hover,
.zealup-sticky-close:hover {
    background-color: #000;
}

.zealup-anchor-close {
    top: -25px;
    right: 0px;
}

.zealup-sticky-close {
    top: -20px;
    right: -1px;
}


/* --- 8.0 - Modals & Popups --- */
/* --- 8.1 - General Modal Styles --- */
.zam-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.zam-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.3s;
}

.zam-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.zam-modal-close:hover,
.zam-modal-close:focus {
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); }
    to { transform: translateY(0); }
}

/* --- 8.2 - Modal Content (Budget, Ad Code) --- */
.zam-budget-estimator {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.zam-budget-estimator h4 {
    margin-top: 0;
    color: #333;
}

.zam-budget-estimator p {
    margin: 8px 0;
    font-size: 16px;
}

.zam-budget-estimator span {
    font-weight: 600;
    color: #4A90E2;
}

.zam-budget-estimator small {
    color: #777;
    font-size: 13px;
    margin-left: 10px;
}

.zam-code-box {
    margin-bottom: 25px;
}

.zam-code-box h4 {
    margin-bottom: 8px;
}

.zam-code-box textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: monospace;
    background-color: #f4f4f4;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}

.zam-code-box .zam-copy-btn {
    margin-top: 10px;
}

#zam-ad-code-modal .zam-modal-content {
    max-width: 900px;
}

.zam-ad-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.zam-ad-template-option {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #fcfcfc;
    display: flex;
    flex-direction: column;
}

.zam-ad-template-option h4 {
    margin-top: 0;
    margin-bottom: 2px;
    font-size: 16px;
    text-align: center;
}

#zam-ad-code-modal textarea {
    min-height: 90px;
    resize: vertical;
}

.zam-ad-template-preview {
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 15px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 300px;
}

.zam-ad-template-preview .zam-ad-preview-template {
    box-shadow: none;
    border: 1px solid #ddd;
    margin: 0;
}

.zam-preview-spotlight-modal {
    transform: scale(0.7);
    transform-origin: center;
}

.zam-preview-story-modal {
    transform: scale(0.55);
    transform-origin: center;
}

.zam-preview-banner-modal {
    transform: scale(0.84);
    transform-origin: center;
}


/* --- 9.0 - Components --- */
/* --- 9.1 - Notifications --- */
.zam-notice {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left-width: 5px;
    border-left-style: solid;
}

.zam-notice-success {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.zam-notice-error {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

/* --- 9.2 - Action Menu Dropdown --- */
.zam-actions-menu {
    position: relative;
    display: inline-block;
}

.zam-actions-trigger {
    background: none;
    border: 1px solid #ccc;
    color: #555;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.zam-actions-trigger:hover {
    background-color: #f0f0f0;
}

.zam-actions-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 100;
    min-width: 150px;
    padding: 5px 0;
}

.zam-actions-dropdown.zam-is-open {
    display: block;
}

.zam-actions-dropdown button,
.zam-actions-dropdown a {
    display: block;
    width: 100%;
    padding: 8px 15px;
    text-align: left;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.zam-actions-dropdown button:hover,
.zam-actions-dropdown a:hover {
    background-color: #f5f5f5;
}

.zam-actions-dropdown .zam-pause-form {
    margin: 0;
}

/* --- 9.3 - Sponsored Tooltip --- */
.zam-sponsored-wrapper {
    position: absolute;
    top: 1px;
    right: 2px;
    z-index: 10;
}

.zam-sponsored-wrapper .zam-sponsored-tag,
.zeal-ad-unit .zam-sponsored-wrapper .zam-sponsored-tag {
    position: static;
    cursor: pointer;
}

.zam-sponsored-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 0;
    right: 0;
    width: 200px;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-size: 11px;
    line-height: 1.4;
    z-index: 9;
}

.zam-sponsored-tooltip.zam-is-visible {
    display: block;
}

.zam-sponsored-tooltip p {
    margin: 0;
    padding: 0;
}

.zam-sponsored-tooltip a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.zam-sponsored-tooltip a:hover {
    text-decoration: underline;
}

/* --- 9.4 - Login Form Wrapper --- */
.zam-login-form-wrapper {
    max-width: 400px;
    margin: 30px auto;
    padding: 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.zam-login-form-wrapper form {
    margin: 0;
}

.zam-login-form-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.zam-login-form-wrapper .input,
.zam-login-form-wrapper input[type="text"],
.zam-login-form-wrapper input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    margin-bottom: 15px;
}

.zam-login-form-wrapper .login-remember label {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
}

.zam-login-form-wrapper .login-remember input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

.zam-login-form-wrapper .login-submit .button {
    background-color: #4A90E2;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
    text-shadow: none;
    box-shadow: none;
}

.zam-login-form-wrapper .login-submit .button:hover {
    background-color: #357ABD;
}

.zam-login-form-wrapper #nav,
.zam-login-form-wrapper .login-lost-password,
.zam-login-form-wrapper .zam-register-link {
    text-align: center;
    margin-top: 15px;
}

/* --- 9.5 - Registration Form --- */
.zam-register-form-wrapper {
    max-width: 450px;
    margin: 30px auto;
    padding: 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.zam-register-form-wrapper .zam-notice-error {
    margin-bottom: 20px;
    padding: 15px;
}

.zam-register-form-wrapper .zam-form-row {
    margin-bottom: 15px;
}

.zam-register-form-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.zam-register-form-wrapper input[type="text"],
.zam-register-form-wrapper input[type="email"],
.zam-register-form-wrapper input[type="password"],
.zam-register-form-wrapper select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}

.zam-register-form-wrapper .zam-terms-row label {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
}

.zam-register-form-wrapper .zam-terms-row input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    flex-shrink: 0;
}

.zam-register-form-wrapper .zam-terms-row a {
    text-decoration: underline;
    color: #4A90E2;
}

.zam-register-form-wrapper .zam-terms-row a:hover {
    color: #357ABD;
}

.zam-register-form-wrapper .zam-button {
    width: 100%;
    margin-top: 10px;
}

.zam-register-form-wrapper .login-link {
    text-align: center;
    margin-top: 15px;
}

/* --- 9.6 - Utility Classes --- */
.zam-hidden {
    display: none;
}

/* --- 9.7 - Publisher Earnings Components --- */
.zam-balance-card,
.zam-withdrawal-card,
.zam-payment-form-card,
.zam-saved-method-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    position: relative;
}
.zam-balance-card h3,
.zam-withdrawal-card h3,
.zam-payment-form-card h4,
.zam-saved-method-box h4 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
}
.zam-balance-card .balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}
.zam-saved-method-box p {
    margin: 0 0 10px 0;
    font-size: 14px;
}
.zam-saved-method-box p strong {
    color: #333;
}
.zam-saved-method-box pre {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    font-size: 13px;
    margin-top: 0;
}
.zam-delete-method-form {
    position: absolute;
    top: 20px;
    right: 20px;
}
.zam-button-delete {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}
.zam-button-delete:hover {
    background-color: #c0392b;
    color: #fff;
}


/* --- 10.0 - Responsive Design --- */
/* --- 10.1 - Tablet & Small Desktop --- */
@media screen and (max-width: 960px) {
    .zam-create-ad-layout {
        grid-template-columns: 1fr;
    }
    .zam-ad-preview-area {
        position: static;
        margin-top: 30px;
    }
}

/* --- 10.2 - Mobile Devices --- */
@media screen and (max-width: 782px) {
    .zam-dashboard-wrapper {
        grid-template-columns: 1fr;
        padding-bottom: 70px;
    }
    .zam-modal-content {
        width: 90%;
        margin: 20% auto;
    }
    .zam-card {
        padding: 15px;
    }
    .zam-card h2 {
        font-size: 22px;
    }
    .zam-card h3 {
        font-size: 18px;
    }
    .zam-form input[type="text"],
    .zam-form input[type="url"],
    .zam-form input[type="number"],
    .zam-form input[type="file"],
    .zam-form select,
    .zam-form textarea {
        max-width: 100%;
    }
    .zam-table {
        border: none;
        display: block;
    }
    .zam-table thead {
        display: none;
    }
    .zam-table tr {
        min-width: 345px;
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    @media (min-width: 600px) and (max-width: 1024px) {
    .zam-table tr {
        min-width: 720px;
    }
}

    .zam-table td {
        border-right: none;
        display: block;
        text-align: right;
        font-size: 15px;
        padding: 8px 0;
        border-bottom: 1px dashed #eee;
    }
    .zam-table td:last-child {
        border-bottom: none;
    }
    .zam-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #333;
        text-transform: uppercase;
        font-size: 13px;
    }
    #tab-campaigns .zam-table td:nth-of-type(1)::before { content: 'Campaign'; }
    #tab-campaigns .zam-table td:nth-of-type(2)::before { content: 'Ad Type'; }
    #tab-campaigns .zam-table td:nth-of-type(3)::before { content: 'Status'; }
    #tab-campaigns .zam-table td:nth-of-type(4)::before { content: 'Budget'; }
    #tab-campaigns .zam-table td:nth-of-type(5)::before { content: 'Actions'; }
    #tab-my-sites .zam-table td:nth-of-type(1)::before { content: 'Site URL'; }
    #tab-my-sites .zam-table td:nth-of-type(2)::before { content: 'Status'; }
    #tab-my-sites .zam-table td:nth-of-type(3)::before { content: 'Actions'; }
    #tab-stats .zam-table td:nth-of-type(1)::before { content: 'Campaign/Site'; }
    #tab-stats .zam-table td:nth-of-type(2)::before { content: 'Impressions'; }
    #tab-stats .zam-table td:nth-of-type(3)::before { content: 'Clicks'; }
    #tab-stats .zam-table td:nth-of-type(4)::before { content: 'CTR'; }
    #tab-stats .zam-table td:nth-of-type(5)::before { content: 'Cost'; }
    #tab-billing .zam-table td:nth-of-type(1)::before { content: 'Order ID'; }
    #tab-billing .zam-table td:nth-of-type(2)::before { content: 'Date'; }
    #tab-billing .zam-table td:nth-of-type(3)::before { content: 'Amount'; }
    #tab-billing .zam-table td:nth-of-type(4)::before { content: 'Campaign'; }
    #tab-billing .zam-table td:nth-of-type(5)::before { content: 'Status'; }
    #tab-earnings .zam-table td:nth-of-type(1)::before { content: 'Date'; }
    #tab-earnings .zam-table td:nth-of-type(2)::before { content: 'Amount'; }
    #tab-earnings .zam-table td:nth-of-type(3)::before { content: 'Status'; }
    #tab-earnings .zam-table td:nth-of-type(4)::before { content: 'Details'; }
    #tab-campaigns .zam-table td:nth-of-type(5),
    #tab-my-sites .zam-table td:nth-of-type(3) {
        text-align: center;
    }
}
