/* ============================================
   CREATE ADS PAGE STYLES
   ============================================ */

/* CPC Rate Wrapper Styles */
.cpc-rate-wrapper {
    width: 120px;
    position: relative;
}

.cpc-rate-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #fff;
    color: #495057;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cpc-rate-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.cpc-rate-placeholder {
    color: #6c757d;
}

.cpc-rate-option {
    color: #212529;
}

/* Form Checkbox Styles */
.form-check .form-check-input {
    float: left;
    margin-left: 1.5em;
}

.mb-10 {
    margin-bottom: 10px !important;
    margin-top: 10px;
}

/* Hide spin arrows from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Form Validation Styles */
.form-group.has-error .form-control {
    border-color: #dc3545;
}

.form-group.has-error .invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
}

/* Keywords Container */
.keywords-container {
    height: 100%;
    display: flex;
    align-items: center;
}

.keywords-container .form-control {
    height: 100%;
    min-height: 100px;
}

/* ============================================
   ENHANCED PRODUCT CARD STYLES
   ============================================ */

.enhanced-product-card {
    background: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.enhanced-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #4e73df;
}

.enhanced-product-card.selected {
    background: #eef2ff;
    border-color: #4e73df;
}

/* Product Checkbox */
.product-checkbox-wrapper {
    margin-right: 16px;
}

.product-checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Product Image */
.product-image-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3e6f0;
    margin-right: 20px;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Product Info */
.product-main-info {
    flex: 1;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-sku {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
}

/* Rating Styles */
.rating-stars {
    color: #f39c12;
    font-size: 14px;
    margin-right: 4px;
}

.rating-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

/* Product Metrics Grid */
.product-metrics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    font-size: 12px;
}

.metric-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.metric-label {
    color: #6c757d;
    font-weight: 400;
}

.metric-value {
    color: #2c3e50;
    font-weight: 600;
}

/* Stock Badge Styles */
.stock-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.stock-high {
    background: #d4edda;
    color: #155724;
}

.stock-medium {
    background: #fff3cd;
    color: #856404;
}

.stock-low {
    background: #f8d7da;
    color: #721c24;
}

/* Ad Recommendation */
.ad-recommendation {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.ad-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.ad-badge.high {
    background: #d4edda;
    color: #155724;
}

.ad-badge.moderate {
    background: #fff3cd;
    color: #856404;
}

.ad-badge.poor {
    background: #f8d7da;
    color: #721c24;
}

/* CPC Section */
.cpc-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 140px;
}

.cpc-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.cpc-select {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #d1d3e2;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.cpc-select:focus {
    outline: none;
    border-color: #4e73df;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
}

.cpc-suggested {
    font-size: 11px;
    color: #858796;
}

.cpc-suggested-value {
    font-weight: 600;
    color: #4e73df;
}

/* No Products State */
.no-products-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fc;
    border-radius: 8px;
    border: 2px dashed #d1d3e2;
}

.no-products-state i {
    font-size: 48px;
    color: #d1d3e2;
    margin-bottom: 16px;
}

.no-products-state p {
    color: #858796;
    font-size: 14px;
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .enhanced-product-card {
        padding: 15px;
    }

    .product-image-wrapper {
        width: 60px;
        height: 60px;
        margin-right: 12px;
    }

    .product-name {
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .product-metrics-grid {
        gap: 8px;
        font-size: 11px;
    }

    .cpc-section {
        min-width: 100px;
    }

    .cpc-select {
        width: 100px;
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .enhanced-product-card {
        padding: 12px;
    }

    .enhanced-product-card .d-flex {
        flex-direction: column;
    }

    .cpc-section {
        align-items: flex-start;
        width: 100%;
        margin-top: 12px;
    }

    .product-checkbox-wrapper {
        margin-right: 12px;
    }
}

/* ============================================
   ADMIN CPC DISPLAY STYLES
   ============================================ */

.admin-cpc-info {
    background: #f0f8ff;
    border-left: 3px solid #4e73df;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.admin-cpc-info .admin-cpc-rate {
    font-size: 13px;
    margin-top: 4px;
}

.admin-cpc-info .text-primary {
    font-size: 15px;
    font-weight: 700;
}

.admin-cpc-info .badge {
    font-size: 10px;
    padding: 3px 8px;
}

/* ============================================
   BANNER UPLOAD SECTION STYLES
   ============================================ */

.banner-upload-section {
    background: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.banner-upload-section h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4e73df;
}

.banner-upload-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fc;
    border-radius: 6px;
}

.banner-upload-item label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.banner-upload-item input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px dashed #d1d3e2;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.banner-upload-item input[type="file"]:hover {
    border-color: #4e73df;
    background: #f0f8ff;
}

.banner-preview {
    margin-top: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 4px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.banner-preview.empty {
    color: #858796;
    font-size: 13px;
}

.banner-size-info {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.banner-validation-error {
    color: #e74a3b;
    font-size: 12px;
    margin-top: 8px;
    padding: 8px;
    background: #fce4e4;
    border-radius: 4px;
    display: none;
}

.banner-validation-error.show {
    display: block;
}

.banner-validation-success {
    color: #1cc88a;
    font-size: 12px;
    margin-top: 8px;
    padding: 8px;
    background: #d4edda;
    border-radius: 4px;
    display: none;
}

.banner-validation-success.show {
    display: block;
}

.placement-selector {
    margin-bottom: 20px;
}

.placement-selector label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}

.placement-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d3e2;
    border-radius: 4px;
    font-size: 14px;
}