/* AdCenter Frontend Minimal Styles */
.adcenter-ad-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.adcenter-ad-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.adcenter-ad {
    position: relative;
}

.adcenter-ad h3 {
    margin: 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.adcenter-ad p {
    margin: 10px 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.adcenter-ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 15px;
    display: block;
}

.adcenter-ad-link {
    color: #007cba;
    text-decoration: none;
    display: block;
}

.adcenter-ad-link:hover {
    text-decoration: none;
}

.adcenter-ad-link:hover h3 {
    color: #005a87;
}

.adcenter-ad-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Timer */
.adcenter-timer {
    background: #f8f9fa;
    color: #666;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 15px;
    display: inline-block;
    border: 1px solid #e9ecef;
}

/* No ads message */
.adcenter-no-ads {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Request ad button - Enhanced styling */
.adcenter-no-ad {
    margin: 20px 0;
    text-align: center;
}

.adcenter-request-ad {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
    border: none;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    min-width: 200px;
    justify-content: center;
}

.adcenter-request-ad:hover {
    background: linear-gradient(135deg, #005a87 0%, #003f5c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 124, 186, 0.4);
    color: white;
    text-decoration: none;
}

.adcenter-request-ad:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.adcenter-request-ad .adcenter-icon {
    font-size: 18px;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.adcenter-request-ad span {
    font-family: 'Vazir', 'Tahoma', sans-serif;
}

/* Legacy button styles for compatibility */
.adcenter-request-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.adcenter-request-btn:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

/* Text ads */
.adcenter-text-ad {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #333;
}

/* Modal */
.adcenter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    direction: rtl;
    backdrop-filter: blur(2px);
}

.adcenter-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.adcenter-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.adcenter-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.adcenter-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.adcenter-modal-close {
    position: absolute;
    top: 16px;
    left: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.adcenter-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

.adcenter-modal-body {
    padding: 24px;
}

.modal-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

/* Form Sections */
.form-section {
    margin-bottom: 32px;
}

.section-title {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 40px;
    height: 2px;
    background: #007cba;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.adcenter-form-group {
    margin-bottom: 0;
}

.adcenter-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.required {
    color: #e74c3c;
    font-weight: 600;
}

.adcenter-form-group input,
.adcenter-form-group textarea,
.adcenter-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #333;
    direction: rtl;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.adcenter-form-group input:focus,
.adcenter-form-group textarea:focus,
.adcenter-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    background: #fff;
}

.adcenter-form-group input::placeholder,
.adcenter-form-group textarea::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.adcenter-form-group textarea {
    height: 80px;
    resize: vertical;
    line-height: 1.5;
}

.help-text {
    display: block;
    margin-top: 4px;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* File Upload */
.file-upload-area {
    position: relative;
}

.file-upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 80px;
}

.file-upload-label:hover {
    border-color: #007cba;
    background: rgba(0, 124, 186, 0.05);
}

.upload-icon {
    font-size: 24px;
    margin-left: 12px;
}

.upload-text {
    color: #495057;
    font-weight: 500;
}

.adcenter-form-submit {
    text-align: left;
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.adcenter-submit-btn {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

.adcenter-submit-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.btn-icon {
    font-size: 16px;
}

.adcenter-cancel-btn {
    background: #fff;
    color: #6c757d;
    border: 2px solid #dee2e6;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.adcenter-cancel-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* Success Modal */
.success-modal .adcenter-modal-content {
    max-width: 450px;
}

.success-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.success-header h2 {
    color: white;
}

.success-header .adcenter-modal-close {
    color: rgba(255, 255, 255, 0.8);
}

.success-header .adcenter-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

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

.success-icon {
    font-size: 64px;
    margin: 20px 0;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-modal h3 {
    color: #28a745;
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0;
}

.success-modal p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 12px 0;
}

.success-note {
    background: #e8f5e8;
    padding: 12px;
    border-radius: 6px;
    color: #155724 !important;
    font-size: 13px !important;
    border-left: 4px solid #28a745;
}

.success-btn {
    background: #28a745 !important;
    margin: 0 auto;
}

.success-btn:hover {
    background: #218838 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .adcenter-modal-content {
        width: 95%;
        margin: 20px;
        max-height: 90vh;
    }

    .adcenter-modal-header,
    .adcenter-modal-body,
    .adcenter-form-submit {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-grid .full-width {
        grid-column: 1;
    }

    .adcenter-form-submit {
        flex-direction: column;
        align-items: stretch;
    }

    .adcenter-submit-btn,
    .adcenter-cancel-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Success/Error messages */
.adcenter-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
}

.adcenter-message.success {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.adcenter-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    .adcenter-ad-container {
        padding: 15px;
        margin: 10px 0;
    }

    .adcenter-modal-content {
        width: 95%;
        margin: 20px;
    }

    .adcenter-modal-header,
    .adcenter-modal-body,
    .adcenter-form-submit {
        padding: 15px;
    }

    .adcenter-submit-btn,
    .adcenter-cancel-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}