/* =============================================================================
   Contact Form Styles
   Matches the TurboTax-inspired onboarding aesthetic
   ============================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--hh-type-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background: var(--hh-color-base-offWhite, #f8f9fa);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-y: auto;
}

.contact-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    padding: 24px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
}

/* Progress Dots */
.contact-progress {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.progress-dots {
    display: flex;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hh-color-borders-default, #e0e0e0);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--hh-color-brand-primary, #F47853);
    width: 24px;
    border-radius: 4px;
}

.progress-dot.completed {
    background: var(--hh-color-brand-primary, #F47853);
}

/* Step Container */
.contact-step {
    display: none;
    flex: 1;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.contact-step.active {
    display: flex;
}

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

/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--hh-color-base-white, #fff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.back-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.step-indicator {
    font-size: 14px;
    color: var(--hh-color-text-secondary, #666);
    font-weight: 500;
}

/* Step Content */
.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 24px;
}

.contact-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--hh-color-text-primary, #1a1a1a);
    text-align: center;
}

.step-subtext {
    font-size: 14px;
    color: var(--hh-color-text-secondary, #666);
    margin-bottom: 24px;
    text-align: center;
}

.step-description {
    font-size: 16px;
    color: var(--hh-color-text-secondary, #666);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Issue Type Cards */
.issue-type-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.issue-type-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--hh-color-base-white, #fff);
    border: 1.5px solid var(--hh-color-borders-default, #e0e0e0);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.issue-type-card:hover {
    border-color: var(--hh-color-brand-primary, #F47853);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.issue-type-card.selected {
    border-color: var(--hh-color-brand-primary, #F47853);
    background: rgba(244, 120, 83, 0.05);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--hh-color-base-offWhite, #f8f9fa);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--hh-color-brand-primary, #F47853);
}

.issue-type-card.selected .card-icon {
    background: var(--hh-color-brand-primary, #F47853);
    color: white;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--hh-color-text-primary, #1a1a1a);
}

.card-description {
    font-size: 13px;
    color: var(--hh-color-text-secondary, #666);
}

/* Selected Type Badge */
.selected-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(244, 120, 83, 0.1);
    border: 1px solid var(--hh-color-brand-primary, #F47853);
    border-radius: 100px;
    margin: 0 auto 24px;
}

#selectedTypeLabel {
    font-size: 14px;
    font-weight: 500;
    color: var(--hh-color-brand-primary, #F47853);
}

/* Message Input */
.message-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.message-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--hh-color-text-secondary, #666);
}

.contact-textarea {
    width: 100%;
    padding: 16px;
    border: 1.5px solid var(--hh-color-borders-default, #e0e0e0);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    transition: all 0.2s ease;
}

.contact-textarea:focus {
    outline: none;
    border-color: var(--hh-color-brand-primary, #F47853);
    box-shadow: 0 0 0 3px rgba(244, 120, 83, 0.1);
}

.contact-textarea::placeholder {
    color: var(--hh-color-text-tertiary, #999);
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--hh-color-text-tertiary, #999);
}

/* Buttons */
.contact-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.contact-btn.primary {
    background: var(--hh-color-brand-primary, #F47853);
    color: white;
}

.contact-btn.primary:hover:not(:disabled) {
    background: var(--hh-color-brand-primary-600, #e06640);
    transform: translateY(-1px);
}

.contact-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

.spinner-track {
    stroke: rgba(255,255,255,0.3);
}

.spinner-head {
    stroke: white;
    stroke-dasharray: 30 70;
    stroke-linecap: round;
}

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

/* Success Step */
.success-step {
    text-align: center;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--hh-color-success, #22c55e);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: scaleIn 0.4s ease;
}

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

/* Mobile Responsive */
@media (max-width: 767px) {
    .contact-container {
        padding-bottom: 24px;
    }

    .contact-progress {
        position: static;
        transform: none;
        margin-top: 24px;
        display: flex;
        justify-content: center;
        order: 99;
    }

    .contact-step.active {
        order: 1;
    }
}

/* Desktop */
@media (min-width: 768px) {
    .contact-container {
        min-height: auto;
        padding: 48px 24px;
    }

    .step-content {
        padding-bottom: 48px;
    }

    .contact-progress {
        bottom: 48px;
    }
}
