/*------------------------------------*\
    Toolbench Inquiry Widget Styles
    Matches Franklyn Tools design system
\*------------------------------------*/

/* Container */
.tbi-form {
    font-family: 'Open Sans', sans-serif;
    max-width: 100%;
}

.tbi-form__step {
    display: none;
}

.tbi-form__step.active {
    display: block;
}

/* Loading & Error States */
.tbi-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.tbi-error {
    background-color: #fee;
    border: 1px solid #c00;
    color: #c00;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Branch Selection (Step 1) */
.tbi-branch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .tbi-branch-grid {
        grid-template-columns: 1fr;
    }
}

.tbi-branch-card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tbi-branch-card:hover {
    border-color: hsl(180, 58%, 63%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tbi-branch-card--selected {
    border-color: #977550;
    background-color: #fdf8f3;
}

.tbi-branch-card__icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.tbi-branch-card__title {
    font-family: 'Arvo', serif;
    font-size: 1.25rem;
    font-weight: bold;
    color: hsl(201, 11%, 10%);
    margin-bottom: 10px;
}

.tbi-branch-card__description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Progress Indicator */
.tbi-progress {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tbi-progress__step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f5;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
}

.tbi-progress__step--active {
    background: #977550;
    color: #fff;
}

.tbi-progress__step--done {
    background: hsl(180, 58%, 63%);
    color: #fff;
}

/* Form Fields */
.tbi-field {
    margin-bottom: 20px;
}

.tbi-field__label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: hsl(201, 11%, 10%);
}

.tbi-field--required .tbi-field__label::after {
    content: " *";
    color: #c00;
}

.tbi-field__input,
.tbi-field__select,
.tbi-field__textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.tbi-field__input:focus,
.tbi-field__select:focus,
.tbi-field__textarea:focus {
    outline: none;
    border-color: hsl(180, 58%, 63%);
}

.tbi-field__textarea {
    min-height: 120px;
    resize: vertical;
}

.tbi-field__error {
    color: #c00;
    font-size: 0.85rem;
    margin-top: 6px;
}

/* Two-column layout for form fields */
.tbi-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .tbi-field-row {
        grid-template-columns: 1fr;
    }
}

/* Ailment Checkboxes */
.tbi-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .tbi-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.tbi-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tbi-checkbox:hover {
    background: #f1f5f5;
}

.tbi-checkbox--checked {
    background: #fdf8f3;
    border-color: #977550;
}

.tbi-checkbox input {
    margin-top: 3px;
}

.tbi-checkbox__desc {
    font-size: 0.85rem;
    color: #666;
}

/* Buttons */
.tbi-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tbi-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tbi-btn--primary {
    background-color: #977550;
    color: #fff;
}

.tbi-btn--primary:hover {
    background-color: #7d6143;
}

.tbi-btn--secondary {
    background-color: #f1f5f5;
    color: hsl(201, 11%, 10%);
}

.tbi-btn--secondary:hover {
    background-color: #e5e9e9;
}

.tbi-btn--loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* CAPTCHA */
.tbi-captcha {
    margin: 20px 0;
}

/* Success State */
.tbi-success {
    text-align: center;
    padding: 40px 20px;
}

.tbi-success h3 {
    font-family: 'Arvo', serif;
    color: hsl(180, 58%, 63%);
    margin-bottom: 20px;
}

.tbi-success__ticket {
    display: inline-block;
    background: #f1f5f5;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #977550;
    margin: 20px 0;
}

/* Powered By */
.tbi-powered {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #999;
}

.tbi-powered a {
    color: #977550;
    text-decoration: none;
}

.tbi-powered a:hover {
    text-decoration: underline;
}

/* Section headers within form */
.tbi-section-title {
    font-family: 'Arvo', serif;
    font-size: 1.1rem;
    color: hsl(201, 11%, 10%);
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #977550;
}

.tbi-section-title:first-child {
    margin-top: 0;
}
