/* AdManager Pro Frontend Styles */

.admanager-ad {
    display: block;
    margin: 10px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admanager-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Image Ads */
.admanager-ad .ad-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.admanager-ad .ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.admanager-ad .ad-link:hover {
    text-decoration: none;
}

/* Video Ads */
.admanager-ad .ad-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.admanager-ad .ad-cta-wrapper {
    margin-top: 10px;
}

.admanager-ad .ad-cta {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.admanager-ad .ad-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

/* HTML Ads */
.admanager-ad .ad-html {
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

/* Zone-specific styles */
.admanager-ad[data-zone="header"] {
    max-width: 728px;
    margin: 0 auto 20px auto;
}

.admanager-ad[data-zone="sidebar"] {
    max-width: 300px;
    margin: 0 0 20px 0;
}

.admanager-ad[data-zone="footer"] {
    max-width: 728px;
    margin: 20px auto 0 auto;
}

.admanager-ad[data-zone="content"] {
    max-width: 600px;
    margin: 20px auto;
}

.admanager-ad[data-zone="popup"] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: white;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .admanager-ad[data-zone="header"],
    .admanager-ad[data-zone="footer"] {
        max-width: 100%;
        margin: 10px auto;
    }
    
    .admanager-ad[data-zone="sidebar"] {
        max-width: 100%;
        margin: 10px 0;
    }
    
    .admanager-ad[data-zone="popup"] {
        width: 90%;
        max-width: 400px;
    }
}

/* Loading state */
.admanager-ad.loading {
    background: #f0f0f0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admanager-ad.loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid #ddd;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error state */
.admanager-ad.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c66;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
}

/* Notice styles */
.admanager-notice {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-weight: 500;
}

.admanager-notice.notice-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.admanager-notice.notice-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.admanager-notice.notice-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.admanager-notice.notice-info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Accessibility */
.admanager-ad:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.ad-link:focus {
    outline: none;
}

/* Print styles */
@media print {
    .admanager-ad {
        display: none !important;
    }
}
