/**
 * WS Frontend Upload WC - Wizard Styles
 * Diseño moderno integrado con el theme SaicoWC
 *
 * @package WS_Frontend_Upload_WC
 * @version 1.0.0
 * @author Wilber Saico
 */

/* ==========================================================================
   WIZARD CONTAINER
   ========================================================================== */

.wsfuwc-upload-wizard {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--saico-spacing-2xl, 3rem) var(--saico-spacing-md, 1rem);
}

/* ==========================================================================
   WIZARD STEPS INDICATOR
   ========================================================================== */

.wsfuwc-wizard-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--saico-spacing-3xl, 4rem);
    position: relative;
}

.wsfuwc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--saico-spacing-sm, 0.5rem);
    flex: 1;
    position: relative;
    z-index: 2;
}

.wsfuwc-step-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--saico-radius-full, 50%);
    background: var(--saico-bg-terciario, #f1f3f5);
    border: 3px solid var(--saico-borde-claro, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--saico-transition-base, 250ms ease-in-out);
}

.wsfuwc-step-icon svg {
    width: 24px;
    height: 24px;
    color: var(--saico-texto-terciario, #9ca3af);
    transition: all var(--saico-transition-base, 250ms ease-in-out);
    opacity: 0;
}

.wsfuwc-step-number {
    font-size: var(--saico-font-lg, 1.125rem);
    font-weight: var(--saico-font-weight-semibold, 600);
    color: var(--saico-texto-secundario, #6b7280);
    transition: all var(--saico-transition-base, 250ms ease-in-out);
}

.wsfuwc-step.active .wsfuwc-step-icon {
    background: var(--saico-primario, #0B996E);
    border-color: var(--saico-primario, #0B996E);
    box-shadow: 0 0 0 4px var(--saico-primario-light, #e6f7f2);
    transform: scale(1.1);
}

.wsfuwc-step.active .wsfuwc-step-icon svg {
    opacity: 0;
}

.wsfuwc-step.active .wsfuwc-step-number {
    color: var(--saico-texto-blanco, #ffffff);
}

.wsfuwc-step.completed .wsfuwc-step-icon {
    background: var(--saico-exito, #10b981);
    border-color: var(--saico-exito, #10b981);
}

.wsfuwc-step.completed .wsfuwc-step-icon svg {
    opacity: 1;
    color: var(--saico-texto-blanco, #ffffff);
}

.wsfuwc-step.completed .wsfuwc-step-number {
    opacity: 0;
    position: absolute;
}

.wsfuwc-step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.wsfuwc-step-title {
    font-size: var(--saico-font-sm, 0.875rem);
    font-weight: var(--saico-font-weight-semibold, 600);
    color: var(--saico-texto-primario, #1a1a1a);
}

.wsfuwc-step-desc {
    font-size: var(--saico-font-xs, 0.75rem);
    color: var(--saico-texto-secundario, #6b7280);
}

.wsfuwc-step-connector {
    height: 3px;
    background: var(--saico-borde-claro, #e5e7eb);
    flex: 1;
    margin: 0 var(--saico-spacing-md, 1rem);
    position: relative;
    top: -35px;
    transition: background var(--saico-transition-base, 250ms ease-in-out);
}

.wsfuwc-step.completed + .wsfuwc-step-connector {
    background: var(--saico-exito, #10b981);
}

/* ==========================================================================
   WIZARD PANELS
   ========================================================================== */

.wsfuwc-form {
    background: var(--saico-bg-primario, #ffffff);
    border-radius: var(--saico-radius-xl, 1rem);
    box-shadow: var(--saico-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
    padding: var(--saico-spacing-2xl, 3rem);
}

.wsfuwc-wizard-panel {
    display: none;
    animation: wsfuwc-fade-in 0.3s ease-in-out;
}

.wsfuwc-wizard-panel.active {
    display: block;
}

@keyframes wsfuwc-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wsfuwc-panel-header {
    margin-bottom: var(--saico-spacing-2xl, 3rem);
    text-align: center;
}

.wsfuwc-panel-header h2 {
    font-size: var(--saico-font-2xl, 1.5rem);
    font-weight: var(--saico-font-weight-bold, 700);
    color: var(--saico-texto-primario, #1a1a1a);
    margin: 0 0 var(--saico-spacing-sm, 0.5rem);
}

.wsfuwc-panel-header p {
    font-size: var(--saico-font-base, 1rem);
    color: var(--saico-texto-secundario, #6b7280);
    margin: 0;
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */

.wsfuwc-form-group {
    margin-bottom: var(--saico-spacing-2xl, 3rem);
}

.wsfuwc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--saico-spacing-xl, 2rem);
}

.wsfuwc-label {
    display: block;
    font-size: var(--saico-font-sm, 0.875rem);
    font-weight: var(--saico-font-weight-semibold, 600);
    color: var(--saico-texto-primario, #1a1a1a);
    margin-bottom: var(--saico-spacing-sm, 0.5rem);
}

.wsfuwc-label.required::after {
    content: " *";
    color: var(--saico-error, #ef4444);
}

.wsfuwc-label-optional {
    font-weight: var(--saico-font-weight-normal, 400);
    color: var(--saico-texto-secundario, #6b7280);
    font-style: italic;
}

.wsfuwc-input,
.wsfuwc-textarea {
    width: 100%;
    padding: var(--saico-spacing-md, 1rem);
    font-size: var(--saico-font-base, 1rem);
    font-family: var(--saico-font-principal, 'Noto Sans JP', sans-serif);
    color: var(--saico-texto-primario, #1a1a1a);
    background: var(--saico-bg-primario, #ffffff);
    border: 2px solid var(--saico-borde-claro, #e5e7eb);
    border-radius: var(--saico-radius-md, 0.5rem);
    transition: all var(--saico-transition-base, 250ms ease-in-out);
}

.wsfuwc-input:focus,
.wsfuwc-textarea:focus {
    outline: none;
    border-color: var(--saico-primario, #0B996E);
    box-shadow: 0 0 0 3px var(--saico-primario-light, #e6f7f2);
}

.wsfuwc-input::placeholder,
.wsfuwc-textarea::placeholder {
    color: var(--saico-texto-terciario, #9ca3af);
}

.wsfuwc-textarea {
    resize: vertical;
    min-height: 120px;
}

.wsfuwc-input-group {
    position: relative;
}

.wsfuwc-input-prefix {
    position: absolute;
    left: var(--saico-spacing-md, 1rem);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--saico-font-base, 1rem);
    font-weight: var(--saico-font-weight-semibold, 600);
    color: var(--saico-texto-secundario, #6b7280);
}

.wsfuwc-input-group .wsfuwc-input {
    padding-left: var(--saico-spacing-2xl, 3rem);
}

.wsfuwc-field-hint {
    display: block;
    margin-top: var(--saico-spacing-xs, 0.25rem);
    font-size: var(--saico-font-xs, 0.75rem);
    color: var(--saico-texto-secundario, #6b7280);
}

/* ==========================================================================
   CATEGORIES GRID
   ========================================================================== */

.wsfuwc-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--saico-spacing-md, 1rem);
}

.wsfuwc-category-card {
    cursor: pointer;
    margin: 0;
}

.wsfuwc-category-card input[type="checkbox"] {
    display: none;
}

.wsfuwc-category-card-inner {
    display: flex;
    flex-direction: column;
    padding: var(--saico-spacing-lg, 1.5rem);
    background: var(--saico-bg-secundario, #f8f9fa);
    border: 2px solid var(--saico-borde-claro, #e5e7eb);
    border-radius: var(--saico-radius-lg, 0.75rem);
    transition: all var(--saico-transition-base, 250ms ease-in-out);
}

.wsfuwc-category-card:hover .wsfuwc-category-card-inner {
    border-color: var(--saico-primario, #0B996E);
    background: var(--saico-primario-light, #e6f7f2);
    transform: translateY(-2px);
    box-shadow: var(--saico-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.wsfuwc-category-card input:checked ~ .wsfuwc-category-card-inner {
    background: var(--saico-primario, #0B996E);
    border-color: var(--saico-primario, #0B996E);
    box-shadow: var(--saico-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

.wsfuwc-category-card input:checked ~ .wsfuwc-category-card-inner .wsfuwc-category-name,
.wsfuwc-category-card input:checked ~ .wsfuwc-category-card-inner .wsfuwc-category-count {
    color: var(--saico-texto-blanco, #ffffff);
}

.wsfuwc-category-name {
    font-size: var(--saico-font-sm, 0.875rem);
    font-weight: var(--saico-font-weight-semibold, 600);
    color: var(--saico-texto-primario, #1a1a1a);
    margin-bottom: var(--saico-spacing-xs, 0.25rem);
}

.wsfuwc-category-count {
    font-size: var(--saico-font-xs, 0.75rem);
    color: var(--saico-texto-secundario, #6b7280);
}

/* ==========================================================================
   UPLOAD AREAS
   ========================================================================== */

.wsfuwc-upload-area {
    border: 2px dashed var(--saico-borde-medio, #d1d5db);
    border-radius: var(--saico-radius-lg, 0.75rem);
    padding: var(--saico-spacing-2xl, 3rem);
    text-align: center;
    cursor: pointer;
    transition: all var(--saico-transition-base, 250ms ease-in-out);
}

.wsfuwc-upload-area:hover {
    border-color: var(--saico-primario, #0B996E);
    background: var(--saico-primario-light, #e6f7f2);
}

.wsfuwc-upload-area.dragging {
    border-color: var(--saico-primario, #0B996E);
    background: var(--saico-primario-light, #e6f7f2);
    transform: scale(1.02);
}

.wsfuwc-upload-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--saico-texto-terciario, #9ca3af);
    margin-bottom: var(--saico-spacing-md, 1rem);
}

.wsfuwc-upload-placeholder p {
    font-size: var(--saico-font-base, 1rem);
    font-weight: var(--saico-font-weight-medium, 500);
    color: var(--saico-texto-primario, #1a1a1a);
    margin: 0 0 var(--saico-spacing-xs, 0.25rem);
}

.wsfuwc-upload-hint {
    font-size: var(--saico-font-xs, 0.75rem);
    color: var(--saico-texto-secundario, #6b7280);
}

/* Image Preview */
.wsfuwc-image-preview {
    margin-top: var(--saico-spacing-md, 1rem);
}

.wsfuwc-image-preview-container {
    position: relative;
    display: inline-block;
    border-radius: var(--saico-radius-lg, 0.75rem);
    overflow: hidden;
    box-shadow: var(--saico-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.wsfuwc-image-preview-container img {
    display: block;
    max-width: 300px;
    height: auto;
}

.wsfuwc-remove-image {
    position: absolute;
    top: var(--saico-spacing-sm, 0.5rem);
    right: var(--saico-spacing-sm, 0.5rem);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--saico-radius-full, 50%);
    background: var(--saico-error, #ef4444);
    color: var(--saico-texto-blanco, #ffffff);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--saico-transition-fast, 150ms ease-in-out);
}

.wsfuwc-remove-image:hover {
    transform: scale(1.1);
    box-shadow: var(--saico-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

.wsfuwc-remove-image svg {
    width: 16px;
    height: 16px;
}

/* Gallery Preview */
.wsfuwc-gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--saico-spacing-md, 1rem);
    margin-top: var(--saico-spacing-md, 1rem);
}

.wsfuwc-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--saico-radius-md, 0.5rem);
    overflow: hidden;
    box-shadow: var(--saico-shadow-sm, 0 1px 3px 0 rgba(0, 0, 0, 0.1));
}

.wsfuwc-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   NAVIGATION BUTTONS
   ========================================================================== */

.wsfuwc-wizard-navigation {
    display: flex;
    align-items: center;
    gap: var(--saico-spacing-md, 1rem);
    margin-top: var(--saico-spacing-2xl, 3rem);
    padding-top: var(--saico-spacing-2xl, 3rem);
    border-top: 1px solid var(--saico-borde-claro, #e5e7eb);
}

.wsfuwc-nav-spacer {
    flex: 1;
}

.wsfuwc-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--saico-spacing-sm, 0.5rem);
    padding: var(--saico-spacing-md, 1rem) var(--saico-spacing-xl, 2rem);
    font-size: var(--saico-font-base, 1rem);
    font-weight: var(--saico-font-weight-semibold, 600);
    font-family: var(--saico-font-principal, 'Noto Sans JP', sans-serif);
    border: none;
    border-radius: var(--saico-radius-lg, 0.75rem);
    cursor: pointer;
    transition: all var(--saico-transition-base, 250ms ease-in-out);
    text-decoration: none;
}

.wsfuwc-btn svg {
    width: 18px;
    height: 18px;
}

.wsfuwc-btn-primary {
    background: var(--saico-primario, #0B996E);
    color: var(--saico-texto-blanco, #ffffff);
}

.wsfuwc-btn-primary:hover {
    background: var(--saico-primario-hover, #0a8660);
    transform: translateY(-2px);
    box-shadow: var(--saico-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

.wsfuwc-btn-secondary {
    background: var(--saico-bg-terciario, #f1f3f5);
    color: var(--saico-texto-primario, #1a1a1a);
}

.wsfuwc-btn-secondary:hover {
    background: var(--saico-borde-medio, #d1d5db);
}

.wsfuwc-btn-success {
    background: var(--saico-exito, #10b981);
    color: var(--saico-texto-blanco, #ffffff);
}

.wsfuwc-btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--saico-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
}

.wsfuwc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */

.wsfuwc-messages {
    margin: var(--saico-spacing-lg, 1.5rem) 0;
}

.wsfuwc-message {
    padding: var(--saico-spacing-md, 1rem) var(--saico-spacing-lg, 1.5rem);
    border-radius: var(--saico-radius-md, 0.5rem);
    font-size: var(--saico-font-sm, 0.875rem);
    margin-bottom: var(--saico-spacing-md, 1rem);
}

.wsfuwc-message-success {
    background: var(--saico-primario-light, #e6f7f2);
    color: var(--saico-primario, #0B996E);
    border-left: 4px solid var(--saico-exito, #10b981);
}

.wsfuwc-message-error {
    background: var(--saico-secundario-light, #ffe6e6);
    color: var(--saico-secundario, #FF6B6B);
    border-left: 4px solid var(--saico-error, #ef4444);
}

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

@media (max-width: 768px) {
    .wsfuwc-upload-wizard {
        padding: var(--saico-spacing-xl, 2rem) var(--saico-spacing-sm, 0.5rem);
    }

    .wsfuwc-wizard-steps {
        margin-bottom: var(--saico-spacing-xl, 2rem);
    }

    .wsfuwc-step {
        flex-direction: column;
        gap: var(--saico-spacing-xs, 0.25rem);
    }

    .wsfuwc-step-icon {
        width: 48px;
        height: 48px;
    }

    .wsfuwc-step-icon svg {
        width: 20px;
        height: 20px;
    }

    .wsfuwc-step-number {
        font-size: var(--saico-font-base, 1rem);
    }

    .wsfuwc-step-content {
        display: none;
    }

    .wsfuwc-step-connector {
        top: -28px;
        margin: 0 var(--saico-spacing-sm, 0.5rem);
    }

    .wsfuwc-form {
        padding: var(--saico-spacing-xl, 2rem) var(--saico-spacing-md, 1rem);
    }

    .wsfuwc-form-row {
        grid-template-columns: 1fr;
        gap: var(--saico-spacing-lg, 1.5rem);
    }

    .wsfuwc-categories-grid {
        grid-template-columns: 1fr;
    }

    .wsfuwc-wizard-navigation {
        flex-wrap: wrap;
    }

    .wsfuwc-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .wsfuwc-nav-spacer {
        display: none;
    }
}
