/* Detective Investigation Estimator Styles */

:root {
    --color-primary: var(--paper, #f3e7d2);
    --color-secondary: var(--gold2, #b1843f);
    --color-text: var(--sepia, #b8a291);
    --color-accent: var(--gold, #caa25a);
    --color-white: #FFFFFF;
    --color-light-bg: var(--paper2, #ead8bd);
    --color-gold: var(--gold, #caa25a);
    --color-gold-light: var(--gold3, #e6c889);
    --color-dark: var(--ink, #27180f);
    --color-darker: var(--sepia2, #6a452c);
    --font-primary: "Cinzel", serif;
    --font-secondary: "Poppins", sans-serif;
}

#detective-estimator-container {
    max-width: 1400px;
    margin: 50px auto;
    background: var(--color-primary);
    border-radius: var(--radius2, 22px);
    border: 1px solid var(--line, rgba(177, 132, 63, .35));
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 30px 20px 0 20px;
}

/* Progress Bar */
.detective-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
    position: relative;
}

.detective-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--color-darker);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-darker);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-family: var(--font-secondary);
    font-size: 12px;
    color: var(--color-text);
    text-align: center;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(183, 150, 88, 0.5);
}

.progress-step.active .step-label {
    color: var(--color-accent);
    font-weight: 500;
}

.progress-step.completed .step-number {
    background: var(--color-secondary);
    color: var(--color-white);
}

/* Trust Badges */
.detective-trust-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-accent);
    font-family: var(--font-secondary);
    font-size: 14px;
}

.trust-badge svg {
    color: var(--color-accent);
}

/* Steps */
.detective-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.detective-step.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detective-step-title {
    font-family: var(--font-primary);
    font-size: 35.25px;
    font-weight: 500;
    line-height: 1.3em;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 12px;
}

.detective-step-subtitle {
    font-family: var(--font-secondary);
    font-size: 17px;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.8em;
}

/* Option Cards */
.detective-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns on desktop */
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .detective-options-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablets */
    }
}

@media (max-width: 768px) {
    .detective-options-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}

/* Ensure all cards are visible and have proper sizing */
.detective-option-card {
    background: var(--color-dark);
    border: 2px solid var(--color-darker);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
    /* Prevents flex overflow issues */
    width: 100%;
    /* Ensures full width in grid cell */
    box-sizing: border-box;
}

/* Add this to ensure the container allows all cards to be visible */
#step-1 .detective-options-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 1200px) {
    #step-1 .detective-options-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    #step-1 .detective-options-grid {
        grid-template-columns: 1fr !important;
    }
}

.detective-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(183, 150, 88, 0.1), transparent);
    transition: left 0.5s ease;
}

.detective-option-card:hover::before {
    left: 100%;
}

.detective-option-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(183, 150, 88, 0.2);
}

.detective-option-card.selected {
    border-color: var(--color-accent);
    background: linear-gradient(135deg, var(--color-dark) 0%, rgba(183, 150, 88, 0.1) 100%);
    box-shadow: 0 0 30px rgba(183, 150, 88, 0.3);
}

.option-icon {
    color: var(--color-accent);
    margin-bottom: 15px;
}

.detective-option-card h3 {
    font-family: var(--font-primary);
    font-size: 20.4px;
    font-weight: 500;
    color: var(--color-white);
    margin-bottom: 10px;
    line-height: 1.6em;
}

.detective-option-card p {
    font-family: var(--font-secondary);
    font-size: 14px;
    color: #a88d79;
    line-height: 1.8em;
}

/* Checkbox Grid for Multiple Selection */
.detective-checkbox-grid .detective-option-card {
    position: relative;
    padding-left: 50px;
}

.detective-checkbox-grid .detective-option-card::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-accent);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.detective-checkbox-grid .detective-option-card.selected::after {
    background: var(--color-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Back Button */
.detective-back-btn {
    background: transparent;
    border: 1px solid var(--color-secondary);
    color: var(--color-accent);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.detective-back-btn:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    transform: translateX(-5px);
}

/* Continue Button */
.detective-continue-btn {
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: block;
    margin: 30px auto 0;
    transition: all 0.3s ease;
}

.detective-continue-btn:hover {
    background: var(--color-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(183, 150, 88, 0.3);
}

/* Navigation Buttons Container */
.detective-navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-top: 1px solid rgba(177, 132, 63, 0.2);
    margin-top: 20px;
}

@media (max-width: 576px) {
    .detective-navigation-buttons {
        padding: 20px 15px;
        flex-direction: column-reverse;
        /* Put 'Back' at the bottom */
        gap: 15px;
    }

    .detective-continue-btn {
        margin: 0 !important;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .detective-back-btn {
        margin: 0 !important;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Form */
.detective-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-family: var(--font-secondary);
    font-size: 14px;
    color: var(--color-darker);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-dark);
    border: 2px solid var(--color-darker);
    border-radius: 8px;
    color: var(--color-white);
    font-family: var(--font-secondary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(183, 150, 88, 0.1);
}

.form-group input::placeholder {
    color: #c8bab0;
    opacity: 0.5;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 30px;
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.form-checkbox label {
    font-family: var(--font-secondary);
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.6em;
    cursor: pointer;
}

/* Submit Button */
.detective-submit-btn {
    width: 100%;
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.detective-submit-btn:hover {
    background: var(--color-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(183, 150, 88, 0.4);
}

.detective-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.detective-success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    color: var(--color-accent);
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-family: var(--font-primary);
    font-size: 35.25px;
    font-weight: 500;
    color: var(--color-dark);
    margin-bottom: 15px;
}

.success-case-id {
    font-family: var(--font-secondary);
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 30px;
}

.success-case-id strong {
    color: var(--color-accent);
    font-weight: 600;
}

.success-content {
    max-width: 600px;
    margin: 0 auto;
}

.success-content>p {
    font-family: var(--font-secondary);
    font-size: 17px;
    color: var(--color-text);
    line-height: 1.8em;
    margin-bottom: 30px;
}

.success-details {
    background: var(--color-dark);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.success-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-darker);
    font-family: var(--font-secondary);
    font-size: 15px;
    color: var(--color-text);
}

.success-detail-item:last-child {
    border-bottom: none;
}

.success-detail-item svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.success-detail-item strong {
    color: var(--color-accent);
}

.success-note {
    background: linear-gradient(135deg, rgba(183, 150, 88, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--color-accent);
    padding: 20px;
    border-radius: 8px;
    text-align: left;
}

.success-note p {
    font-family: var(--font-secondary);
    font-size: 15px;
    color: var(--color-text);
    line-height: 1.8em;
    margin-bottom: 10px;
}

.success-note p:last-child {
    margin-bottom: 0;
}

.success-note strong {
    color: var(--color-dark);
}

.detective-new-request-btn {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    padding: 14px 40px;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s ease;
}

.detective-new-request-btn:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* Popular Badge */
.popular-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-family: var(--font-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    #detective-estimator-container {
        padding: 15px;
        margin: 20px 10px;
    }

    .detective-progress-bar {
        padding: 0 10px;
    }

    .step-label {
        font-size: 10px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .detective-trust-badges {
        gap: 15px;
    }

    .trust-badge {
        font-size: 12px;
    }

    .detective-step-title {
        font-size: 24.48px;
    }

    .detective-step-subtitle {
        font-size: 15px;
    }

    .detective-options-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .detective-option-card {
        padding: 20px 15px;
    }

    .detective-option-card h3 {
        font-size: 18px;
    }

    .success-title {
        font-size: 24.48px;
    }

    .success-case-id {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .detective-progress-bar {
        padding: 0 5px;
    }

    .progress-step {
        flex-direction: column;
        gap: 4px;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 13px;
        margin-bottom: 4px;
    }

    .step-label {
        font-size: 9px;
        text-align: center;
        letter-spacing: -0.2px;
    }
}