/**
 * Product Steps CSS
 *
 * Styles for the 3-step frontend flow on Custom products
 *
 * @package PrintShopStudio
 * @since 1.0.0
 */

/* Main Container */
.pss-product-steps {
    margin: 20px 0;
    padding: 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Steps Progress Indicator */
.pss-steps-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.pss-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.pss-step-indicator.active,
.pss-step-indicator.completed {
    opacity: 1;
}

.pss-step-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #666;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pss-step-indicator.active .pss-step-number {
    background: #2271b1;
    color: #fff;
}

.pss-step-indicator.completed .pss-step-number {
    background: #46b450;
    color: #fff;
}

.pss-step-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    text-align: center;
}

.pss-step-indicator.active .pss-step-label {
    color: #2271b1;
    font-weight: 600;
}

.pss-step-connector {
    width: 60px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 15px;
    margin-bottom: 28px;
}

/* Step Content */
.pss-step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.pss-step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pss-step-title {
    margin: 0 0 15px;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.pss-step-description {
    color: #666;
    margin-bottom: 20px;
}

/* Step 1: Colour Selector */
.pss-colour-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.pss-colour-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9f9f9;
    min-width: 80px;
}

.pss-colour-option:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.pss-colour-option input {
    display: none;
}

.pss-colour-option input:checked + .pss-colour-swatch {
    box-shadow: 0 0 0 3px #2271b1;
}

.pss-colour-option:has(input:checked) {
    border-color: #2271b1;
    background: #f0f6fc;
}

.pss-colour-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    transition: box-shadow 0.2s ease;
}

.pss-colour-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    text-align: center;
}

/* Step 2: Size Selector */
.pss-size-selector {
    margin-bottom: 20px;
}

.pss-size-table {
    width: 100%;
    max-width: 400px;
    border-collapse: collapse;
}

.pss-size-table th,
.pss-size-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pss-size-table th {
    font-weight: 600;
    color: #333;
    background: #f9f9f9;
}

.pss-size-name {
    font-weight: 500;
}

.pss-qty-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.pss-qty-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.pss-quantity-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f0f6fc;
    border-radius: 6px;
    margin-bottom: 20px;
}

.pss-total-label {
    font-weight: 600;
    color: #333;
}

.pss-total-qty {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
}

/* Step 3: Design Summary */
.pss-design-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.pss-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pss-summary-item:last-child {
    margin-bottom: 0;
}

.pss-summary-label {
    font-weight: 600;
    color: #666;
    min-width: 100px;
}

.pss-summary-value {
    font-weight: 500;
    color: #333;
}

/* Step Actions */
.pss-step-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

/* Buttons */
.pss-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pss-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.pss-btn-primary {
    background: #2271b1;
    color: #fff;
}

.pss-btn-primary:hover:not(:disabled) {
    background: #135e96;
}

.pss-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pss-btn-secondary {
    background: #f0f0f1;
    color: #50575e;
}

.pss-btn-secondary:hover {
    background: #ddd;
}

.pss-btn-design {
    background: #46b450;
    color: #fff;
    font-size: 16px;
    padding: 15px 30px;
}

.pss-btn-design:hover {
    background: #3a9a42;
}

.pss-btn-design .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .pss-product-steps {
        padding: 15px;
    }

    .pss-steps-progress {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pss-step-connector {
        display: none;
    }

    .pss-step-indicator {
        flex: 1;
        min-width: 80px;
    }

    .pss-colour-selector {
        justify-content: center;
    }

    .pss-colour-option {
        min-width: 70px;
        padding: 10px;
    }

    .pss-size-table {
        max-width: 100%;
    }

    .pss-step-actions {
        flex-direction: column-reverse;
    }

    .pss-btn {
        width: 100%;
        justify-content: center;
    }
}
