/**
 * AFC Image Wizard Styles
 */

/* Wizard Container */
.afc-wizard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Stepper */
.afc-wizard-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    overflow-x: auto;
}

.afc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
}

.afc-step-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8e8e8;
    color: #666;
    transition: all .3s;
}

.afc-step-icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.afc-step-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.afc-step.active .afc-step-icon {
    background: #273AE5;
    color: #fff;
}

.afc-step.active .afc-step-label {
    color: #273AE5;
    font-weight: 600;
}

.afc-step.completed .afc-step-icon {
    background: #4caf50;
    color: #fff;
}

.afc-step.completed .afc-step-label {
    color: #4caf50;
}

.afc-step-line {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    margin: 0 10px;
    min-width: 20px;
}

/* Wizard Content */
.afc-wizard-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.afc-wizard-step h2 {
    margin: 0 0 25px;
    font-size: 1.4rem;
    color: #1a1a2e;
    border-bottom: 2px solid #273AE5;
    padding-bottom: 12px;
}

/* Accuracy Notice */
.afc-accuracy-notice {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 0 8px 8px 0;
}

.afc-accuracy-notice h4 {
    margin: 0 0 12px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.afc-accuracy-notice p {
    margin: 0 0 10px;
    color: #664d03;
    font-size: 14px;
    line-height: 1.6;
}

.afc-accuracy-notice p:last-child {
    margin-bottom: 0;
}

/* AFC UPDATE: Configurable creator notice styling (matches accuracy notice) */
.afc-creator-notice {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 0 8px 8px 0;
}

.afc-creator-notice h4 {
    margin: 0 0 12px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.afc-creator-notice-content {
    color: #664d03;
    font-size: 14px;
    line-height: 1.6;
}

.afc-creator-notice-content p {
    margin: 0 0 10px;
}

.afc-creator-notice-content p:last-child {
    margin-bottom: 0;
}

.afc-accuracy-notice-final {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: #2196f3;
}

.afc-accuracy-notice-final h4 {
    color: #1565c0;
}

.afc-accuracy-notice-final p {
    color: #0d47a1;
}

/* Form Elements */
.afc-form-row {
    margin-bottom: 20px;
}

.afc-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.afc-form-row label .required {
    color: #e94560;
}

.afc-form-row input[type="text"],
.afc-form-row input[type="number"],
.afc-form-row input[type="file"],
.afc-form-row textarea,
.afc-form-row select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s;
}

.afc-form-row input:focus,
.afc-form-row textarea:focus,
.afc-form-row select:focus {
    border-color: #273AE5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 58, 229, 0.1);
}

/* Tooltip */
.afc-tooltip {
    cursor: help;
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background: #273AE5;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
    vertical-align: middle;
}

.afc-tooltip-popup {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    max-width: 250px;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.afc-tooltip-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.afc-tooltip-old {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-size: 12px;
    cursor: help;
    margin-left: 5px;
    vertical-align: middle;
}

.afc-tooltip:hover {
    background: #273AE5;
    color: #fff;
}

.afc-tooltip-popup {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    max-width: 250px;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.afc-tooltip-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

/* Field Error */
.afc-field-error {
    color: #c62828;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.afc-field-error:not(:empty) {
    display: block;
}

/* Price Input */
.afc-price-input {
    position: relative;
    display: flex;
    align-items: center;
}

.afc-price-input .afc-currency {
    position: absolute;
    left: 12px;
    color: #666;
    font-weight: 500;
}

.afc-price-input input {
    padding-left: 40px !important;
}

/* Radio/Checkbox Lists */
.afc-radio-list,
.afc-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    max-height: 200px;
    overflow-y: auto;
}

.afc-radio-item,
.afc-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all .2s;
}

.afc-radio-item:hover,
.afc-checkbox-item:hover {
    border-color: #273AE5;
    background: #f0f2ff;
}

.afc-radio-item input:checked + span,
.afc-checkbox-item input:checked + span {
    color: #273AE5;
    font-weight: 500;
}

.afc-radio-item input,
.afc-checkbox-item input {
    accent-color: #273AE5;
}

/* Checkbox Confirm */
.afc-checkbox-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
}

.afc-checkbox-confirm input {
    margin-top: 3px;
    accent-color: #273AE5;
    transform: scale(1.2);
}

/* Image Preview */
.afc-image-preview-box {
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.afc-image-preview-box img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.afc-draft-file-note {
    margin-top: 10px;
    color: #4caf50;
    font-size: 14px;
}

.afc-draft-file-note .dashicons {
    vertical-align: middle;
}

/* Review Summary */
.afc-review-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.afc-review-table th,
.afc-review-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.afc-review-table th {
    width: 35%;
    color: #666;
    font-weight: 500;
    background: #f9f9f9;
}

.afc-review-table td {
    color: #333;
}

/* Wizard Navigation */
.afc-wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.afc-wizard-nav .afc-btn {
    min-width: 140px;
    justify-content: center;
}

#wizard-btn-draft {
    margin-right: auto;
}

/* Notices */
.afc-notice {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.afc-notice-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.afc-notice-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* Field Hint */
.afc-field-hint {
    color: #888;
    font-size: 13px;
    margin-top: 5px;
}

.afc-no-terms {
    color: #f44336;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .afc-wizard-stepper {
        padding: 15px 10px;
    }
    
    .afc-step {
        min-width: 60px;
    }
    
    .afc-step-label {
        font-size: 10px;
    }
    
    .afc-step-icon {
        width: 40px;
        height: 40px;
    }
    
    .afc-wizard-content {
        padding: 20px 15px;
    }
    
    .afc-wizard-nav {
        flex-direction: column;
    }
    
    .afc-wizard-nav .afc-btn {
        width: 100%;
    }
    
    #wizard-btn-draft {
        order: 3;
        margin-right: 0;
    }
}

/* Table improvements for images list */
.afc-images-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.afc-images-table th {
    background: #f5f5f5;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.afc-images-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.afc-images-table tr:hover {
    background: #f9f9f9;
}

.afc-images-table img {
    border-radius: 6px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .afc-images-table {
        display: block;
        overflow-x: auto;
    }
    
    .afc-images-table th,
    .afc-images-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
}
