/* ================================================
   ADS CREATION SYSTEM CSS
   ================================================ */

/* CSS Variables */

/* Common Ads Page Styling */
/* .ads-creation-page,
.ads-store-info-page,
.ads-content-info-page,
.ads-pricing-page {
} */

.object-fit-cover {
    object-fit: cover;
}

.content-wrapper {
    background: #fff;
}

.image-slider-wrapper {
    min-height: max-content;
    padding-left: 2rem;
    display: flex;
    align-items: center;
}

@media (max-width: 991.98px) {
    .content-wrapper {
        border-radius: 0;
    }
    
    .image-slider-wrapper {
        padding-left: 0;
    }
}

/* Headers */
.ads-creation-page h1,
.ads-store-info-page h1,
.ads-content-info-page h1,
.ads-pricing-page h1 {
    color: var(--color-primary);
}

/* Package Info Styling */
.package-info {
    border-left: 3px solid #dee2e6;
    padding-left: 10px;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.25);
}

/* Add border for select elements in ads pages */
.ads-store-info-page .form-select,
.ads-content-info-page .form-select,
.ads-content-info-page .input-group-text {
    border: var(--bs-border-width) solid var(--color-border);
}

/* Placeholder styling with red asterisk */
.form-control::placeholder,
.form-select option[value=""]:first-child {
    color: var(--bs-body-color) !important;
}

/* Force red asterisk for required placeholders */
.form-control[placeholder*="*"]::placeholder {
    color: var(--bs-body-color) !important;
    font-weight: normal;
}

/* Add red asterisk using CSS pseudo-element for inputs */
.form-control[placeholder*="*"] {
    position: relative;
}

.form-control[placeholder*="*"]::-webkit-input-placeholder {
    color: var(--bs-body-color);
}

.form-control[placeholder*="*"]::-moz-placeholder {
    color: var(--bs-body-color);
}

.form-control[placeholder*="*"]:-ms-input-placeholder {
    color: var(--bs-body-color);
}

.form-control[placeholder*="*"]::placeholder {
    color: var(--bs-body-color);
}

/* Style for select with asterisk in first option */
.form-select option[value=""]:first-child {
    color: var(--bs-body-color) !important;
}

/* Red asterisk using data attribute approach */
.form-control[data-required="true"]::after,
.form-select[data-required="true"]::after {
    content: " *";
    color: #dc3545 !important;
    font-weight: bold;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Better red asterisk approach */
.required-asterisk {
    color: #dc3545 !important;
    font-weight: bold;
    margin-left: 2px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 3;
    font-size: 16px;
}

/* Adjust for select elements */
.position-relative .form-select + .required-asterisk {
    right: 35px;
}

/* Adjust for input groups */
.input-group .required-asterisk {
    right: 10px;
}

/* Auto-resize textarea */
.auto-resize {
    transition: height 0.2s ease;
    overflow-y: hidden;
}

.auto-resize:focus {
    outline: none;
}

/* Rich text editor for content textarea */
#ad_content {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* Image Upload Grid */
.image-upload-grid .row {
    --bs-gutter-x: 0.5rem;
}

@media (min-width: 992px) {
    .image-upload-grid .row .col-12 {
        flex: 0 0 auto;
        width: 20%;
    }
    
    .image-upload-grid .row .col-6 {
        flex: 0 0 auto;
        width: 20%;
    }
}

.image-upload-grid .image-upload-box {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.image-upload-grid .image-upload-box:hover {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.05);
    transform: translateY(-2px);
}

.image-upload-grid .image-upload-box i {
    font-size: 24px;
    color: #6c757d;
    margin-bottom: 8px;
}

.image-upload-grid .image-upload-box span {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.image-upload-grid .image-upload-box:hover i,
.image-upload-grid .image-upload-box:hover span {
    color: var(--color-primary);
}

/* Image overlay for uploaded images */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-upload-box:hover .image-overlay {
    opacity: 1;
}

.image-overlay .btn {
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Map Placeholder */
.map-placeholder {
    height: 350px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border-radius: 0.375rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 12px 40px;
    font-size: 16px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 12px 40px;
    font-size: 16px;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Continue/Checkout Button Styling */
.btn-continue,
.btn-checkout {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: none;
}

/* ================================================
   PRICING SYSTEM CSS - Adapted from pricing.css
   ================================================ */

/* Pricing Section */
.pricing-section {
    padding: 2rem 0;
}

/* Pricing Cards Layout */
@media (min-width: 992px) {
    .basic-packages-row .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }
    
    .vip-packages-row .col-lg-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

/* Pricing Cards */
.pricing-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.pricing-card .card {
    border-radius: 15px !important;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    transition: all 0.3s ease;
}

.pricing-card:hover:not(.disabled) {
    transform: translateY(-5px);
    box-shadow: rgba(0, 0, 0, 0.15);
}

.pricing-card:hover:not(.disabled) .card {
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.pricing-card.disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Toggle Selection Effect */
.pricing-card:not(.disabled):active .card {
    transform: scale(0.98);
}

/* Selected Card Effect */
.pricing-card.selected .card {
    border-color: var(--color-primary) !important;
    border-width: 4px !important;
    box-shadow: 0 0 0 0.5rem rgba(var(--color-primary-rgb), 0.25);
}

/* Basic Package Selected Colors */
.pricing-card.basic-package[data-duration="1"].selected .card {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.5rem rgba(25, 135, 84, 0.25);
}

.pricing-card.basic-package[data-duration="3"].selected .card {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.5rem rgba(13, 110, 253, 0.25);
}

.pricing-card.basic-package[data-duration="6"].selected .card {
    border-color: #0dcaf0 !important;
    box-shadow: 0 0 0 0.5rem rgba(13, 202, 240, 0.25);
}

.pricing-card.basic-package[data-duration="12"].selected .card {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.5rem rgba(255, 193, 7, 0.25);
}

/* VIP Package Selected Colors */
.pricing-card.vip-package[data-duration="3"].selected .card {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.5rem rgba(13, 110, 253, 0.25);
}

.pricing-card.vip-package[data-duration="6"].selected .card {
    border-color: #0dcaf0 !important;
    box-shadow: 0 0 0 0.5rem rgba(13, 202, 240, 0.25);
}

.pricing-card.vip-package[data-duration="12"].selected .card {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.5rem rgba(255, 193, 7, 0.25);
}

/* Card Header Title Colors */
.pricing-card .pricing-title {
    font-weight: 600;
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0;
}

.pricing-card[data-duration="1"] .pricing-title {
    color: #198754 !important;
}

.pricing-card[data-duration="3"] .pricing-title {
    color: #0d6efd !important;
}

.pricing-card[data-duration="6"] .pricing-title {
    color: #0dcaf0 !important;
}

.pricing-card[data-duration="12"] .pricing-title {
    color: #ffc107 !important;
}

/* VIP disabled state */
.pricing-card.vip-package.disabled .pricing-title {
    color: #6c757d !important;
}

/* Price Display Styling */
.price-display {
    margin-top: 1rem;
}

.price-container {
    position: relative;
    display: inline-block;
    line-height: 1;
}

.price-currency {
    font-size: 1.4rem;
    font-weight: 500;
    position: absolute;
    top: 0.3rem;
    left: -1.2rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: bold;
    display: inline-block;
}

/* Hidden Radio Buttons */
.btn-check.d-none {
    display: none !important;
}

/* Icon Colors */
.fas.fa-check {
    color: #28a745 !important;
}

.fas.fa-times {
    color: #dc3545 !important;
}

.fas.fa-crown {
    color: #ffd700 !important;
}

/* VIP Package Special Effects */
.vip-package .card-header {
    position: relative;
    overflow: hidden;
}

.vip-package:not(.disabled) .card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* VIP Disabled State */
.vip-package.disabled .card-header::before {
    display: none;
}

/* Order Summary */
.order-summary .selected-packages .package-name {
    font-weight: 500;
}

.order-summary .selected-packages .package-price {
    font-weight: bold;
    color: #198754;
}

.order-summary .totals .fw-bold {
    font-size: 1.25rem;
    color: #198754;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pricing-card .card-header {
        padding: 1rem;
    }
    
    .price-amount {
        font-size: 2.5rem;
    }
    
    .price-currency {
        font-size: 1.2rem;
        top: 0.2rem;
        left: -1rem;
    }
    
    .pricing-section {
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    .pricing-card {
        margin-bottom: 1.5rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .price-currency {
        font-size: 1rem;
        left: -0.8rem;
    }
}

/* Responsive image upload */
@media (max-width: 991.98px) {
    .image-upload-grid .col-lg-2 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 575.98px) {
    .image-upload-grid .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .image-upload-grid .image-upload-box {
        min-height: 100px;
        padding: 15px;
    }
}

/* Pricing card selection states */
.pricing-card.active .card {
    border: 3px solid var(--color-primary) !important;
    box-shadow: 0 0 20px rgba(var(--color-primary-rgb), 0.3);
    transform: translateY(-5px);
}

.pricing-card.active .price-amount {
    color: var(--color-primary);
    font-weight: bold;
}

/* Form header styling */
.form-header {
    text-transform: uppercase;
    font-weight: bold;
    color: var(--color-primary);
    text-align: center;
}

/* Simple red asterisk overlay for required fields */
.required-field[data-required="true"] {
    position: relative !important;
}

.required-field[data-required="true"]::after {
    content: "*";
    color: #dc3545 !important;
    font-weight: bold;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
    font-size: 16px;
}

/* Adjust for select elements */
.form-select.required-field[data-required="true"]::after {
    right: 40px;
}

/* Adjust for input groups */
.input-group .required-field[data-required="true"]::after {
    right: 12px;
}

/* Adjust for textarea */
textarea.required-field[data-required="true"]::after {
    top: 20px;
    transform: none;
}

/* Standard placeholder styling */
.required-field::placeholder {
    color: var(--bs-body-color) !important;
}

.form-select[data-required="true"] option:first-child {
    color: var(--bs-body-color) !important;
} 