/* workflow.css */

.workflow-main {
    flex-grow: 1;
    background-color: #1a1a2e;
    padding: 60px 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align content to the top */
}

.workflow-container {
    background-color: #20203a;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 40px rgba(138, 43, 226, 0.2);
    width: 100%;
    max-width: 900px; /* Wider container for workflow */
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(138, 43, 226, 0.3);
    margin-top: 30px; /* Space from navbar */
    margin-bottom: 30px;
}

.workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 1px solid #3a3a5a;
    position: relative;
}

.workflow-header::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px; /* Position above the border */
    height: 3px;
    background: linear-gradient(to right, #8a2be2, #4c00a0);
    width: 0%; /* Initial width for progress */
    transition: width 0.5s ease-out;
}

.workflow-header .workflow-step {
    flex: 1;
    text-align: center;
    color: #80809b; /* Inactive step color */
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding-top: 30px; /* Space for the circle */
    transition: color 0.3s ease;
}

.workflow-header .workflow-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 25px;
    background-color: #3a3a5a; /* Inactive circle background */
    border-radius: 50%;
    border: 2px solid #80809b; /* Inactive border */
    z-index: 2;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.workflow-header .workflow-step::after {
    content: '';
    position: absolute;
    top: 11px; /* Center with circle */
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #3a3a5a; /* Inactive line */
    transform: translateX(-50%);
    z-index: 1;
}

.workflow-header .workflow-step:last-child::after {
    display: none; /* No line after the last step */
}


.workflow-header .workflow-step.active {
    color: #e0e0e0; /* Active step text color */
    font-weight: 600;
}

.workflow-header .workflow-step.active::before {
    background-color: #8a2be2; /* Active circle background */
    border-color: #8a2be2; /* Active circle border */
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

/* Specific section styling (e.g., upload-section) */
.upload-section h2, .customize-section h2, .review-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #f0f0f0, #a052ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-section .section-description,
.customize-section .section-description,
.review-section .section-description {
    font-size: 1.1rem;
    color: #c0c0c0;
    margin-bottom: 30px;
}

.drop-area {
    border: 3px dashed #8a2be2;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    background-color: #2c2c4a;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.drop-area:hover {
    background-color: #3a3a5a;
    border-color: #a052ee;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
}

.drop-area.highlight {
    background-color: #3a3a5a;
    border-color: #a052ee;
}

.drop-area .upload-icon {
    font-size: 4rem;
    color: #8a2be2;
    margin-bottom: 20px;
}

.drop-area p {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 25px;
}

.browse-btn {
    padding: 12px 30px;
    font-size: 1rem;
}

.upload-status {
    color: #e0e0e0;
    margin-top: 15px;
    font-size: 0.95rem;
    min-height: 20px; /* Prevent layout shift */
}

.image-preview-container {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.image-preview-container img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 10px;
}

.image-preview-container #preview-placeholder {
    color: #80809b;
    font-size: 1.3rem;
    position: absolute;
}

.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.remove-image-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

.workflow-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end; /* Align to right for "Next Step" */
    gap: 15px;
}

.workflow-navigation .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- Customize Pendant Page Specifics --- */
.customize-section .customize-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: left;
    margin-bottom: 40px;
}

.customize-section .option-group {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.customize-section .option-group label {
    display: block;
    font-size: 1.1rem;
    color: #f0f0f0;
    margin-bottom: 15px;
    font-weight: 600;
}

.customize-section .option-group select,
.customize-section .option-group input[type="number"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #4a4a6a;
    border-radius: 8px;
    background-color: #2b2b48;
    color: #e0e0e0;
    font-size: 1rem;
    appearance: none; /* Remove default select arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23e0e0e0" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    cursor: pointer;
}

.customize-section .option-group input[type="number"] {
    text-align: center;
}

.customize-section .option-group select:focus,
.customize-section .option-group input[type="number"]:focus {
    border-color: #8a2be2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
}

/* Slider for size */
.customize-section .option-group input[type="range"] {
    width: 100%;
    height: 8px;
    background: #4a4a6a;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 10px;
}

.customize-section .option-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8a2be2;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.customize-section .option-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8a2be2;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.customize-section .option-group input[type="range"]::-webkit-slider-thumb:hover,
.customize-section .option-group input[type="range"]::-moz-range-thumb:hover {
    background: #a052ee;
    box-shadow: 0 0 0 4px rgba(138, 43, 226, 0.7);
}

#size-value {
    font-size: 0.95rem;
    color: #c0c0c0;
    margin-top: 10px;
}


/* Color Swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-swatch.selected {
    border-color: #8a2be2;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.5);
    transform: scale(1.1);
}

.color-swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.3);
}

/* Quantity input with stepper buttons */
.quantity-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 180px; /* Limit width */
    margin: 10px auto 0; /* Center it */
}

.quantity-btn {
    background-color: #8a2be2;
    color: white;
    border: none;
    border-radius: 5px;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
}

.quantity-btn:hover {
    background-color: #a052ee;
}

.quantity-input {
    flex-grow: 1;
    text-align: center;
    font-size: 1.1rem;
    padding: 8px 5px;
    margin: 0 5px;
    border: 1px solid #4a4a6a;
    border-radius: 5px;
    background-color: #2b2b48;
    color: #e0e0e0;
    -moz-appearance: textfield; /* Hide Firefox number arrows */
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Keychain type selection */
.keychain-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.keychain-option {
    background-color: #2b2b48;
    border: 1px solid #4a4a6a;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.keychain-option:hover {
    border-color: #8a2be2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.keychain-option.selected {
    border-color: #8a2be2;
    background-color: #3a3a5a;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.5);
}

.keychain-option img {
    max-width: 60px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: brightness(1.2); /* Make icons stand out */
}

.keychain-option p {
    font-size: 0.85rem;
    color: #c0c0c0;
    margin: 0;
}


/* --- Review 3D Model Page Specifics --- */
.review-section {
    text-align: center;
}

.model-viewer-container {
    position: relative;
    width: 100%;
    height: 500px; /* Adjust height as needed for the 3D viewer */
    background-color: #1a1a2e; /* Dark background for 3D viewer */
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(138, 43, 226, 0.4);
    overflow: hidden; /* Ensure 3D model doesn't overflow */
    display: flex; /* For centering placeholder */
    justify-content: center;
    align-items: center;
    color: #80809b;
    font-size: 1.5rem;
}

.model-viewer-container #threejs-canvas {
    width: 100%;
    height: 100%;
    display: block; /* Remove extra space below canvas */
}

.model-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.model-info-item {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    padding: 20px;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.model-info-item strong {
    display: block;
    color: #f0f0f0;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.model-info-item span {
    color: #c0c0c0;
    font-size: 1rem;
}

.approval-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.approval-buttons .btn {
    padding: 12px 30px;
    font-size: 1rem;
}

.btn-reject {
    background-color: #dc3545; /* Red for reject */
    color: white;
}
.btn-reject:hover {
    background-color: #c82333;
}


/* Responsive */
@media (max-width: 992px) {
    .workflow-container {
        max-width: 700px;
        padding: 30px;
    }
    .workflow-header {
        margin-bottom: 40px;
    }
    .workflow-header .workflow-step {
        font-size: 0.85rem;
        padding-top: 25px;
    }
    .workflow-header .workflow-step::before {
        width: 20px;
        height: 20px;
    }
    .workflow-header .workflow-step::after {
        top: 9px;
    }
    .upload-section h2, .customize-section h2, .review-section h2 {
        font-size: 2rem;
    }
    .customize-section .customize-options-grid {
        grid-template-columns: 1fr; /* Stack options on smaller screens */
        gap: 30px;
    }
    .model-viewer-container {
        height: 400px;
    }
    .model-info {
        flex-direction: column;
        align-items: center;
    }
    .model-info-item {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .workflow-container {
        max-width: 100%;
        margin: 20px;
        padding: 25px;
    }
    .workflow-header {
        margin-bottom: 30px;
        flex-wrap: wrap; /* Allow steps to wrap */
        justify-content: center;
        gap: 10px 20px; /* Vertical and horizontal gap for wrapped items */
    }
    .workflow-header .workflow-step {
        flex: unset; /* Remove flex grow */
        width: 45%; /* Two steps per row */
        padding-top: 20px;
    }
    .workflow-header .workflow-step::after {
        display: none; /* Hide lines for wrapped steps */
    }
    .drop-area {
        padding: 40px 20px;
    }
    .drop-area .upload-icon {
        font-size: 3rem;
    }
    .drop-area p {
        font-size: 1rem;
    }
    .image-preview-container {
        min-height: 200px;
        max-height: 200px;
    }
    .model-viewer-container {
        height: 300px;
    }
    .approval-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .approval-buttons .btn {
        width: 100%;
    }
}
