@import url('theme.css');

.service-section {
    padding: 4rem 0 6rem;
    background-color: var(--color-dark-gray);
}

.service-section .container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* === Service intro (shown above the app on all states) === */
.service-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.service-intro h2 {
    font-size: 1.6rem;
    color: var(--color-gold);
    margin-bottom: 0.75rem;
}

.service-intro p {
    color: var(--color-light-gray);
    line-height: 1.7;
}

/* === Shared card shell === */
.service-card {
    background: var(--color-medium-gray);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-medium);
}

@media (max-width: 480px) {
    .service-card {
        padding: 1.75rem 1.25rem;
    }
}

/* === Auth tabs === */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-dark-gray);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.9rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-light-gray);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: var(--transition);
}

.auth-tab.active {
    color: var(--color-gold);
}

.auth-tab.active::after {
    transform: scaleX(1);
}

.auth-tab:hover {
    color: var(--color-gold);
}

/* === Forms (shared by signup / login / questionnaire) === */
.service-form h3 {
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.service-form .form-subtitle {
    color: var(--color-light-gray);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.service-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 480px) {
    .service-form .form-row {
        grid-template-columns: 1fr;
    }
}

.service-form .form-group {
    margin-bottom: 1.5rem;
}

.service-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-gold);
    font-weight: 500;
}

.service-form .field-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--color-light-gray);
    opacity: 0.8;
}

.service-form input,
.service-form select {
    width: 100%;
    padding: 0.9rem;
    background: var(--color-dark-gray);
    border: 2px solid var(--color-dark-gray);
    border-radius: 8px;
    color: var(--color-white);
    font-size: 1rem;
    transition: var(--transition);
}

.service-form input:focus,
.service-form select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.service-form button[type="submit"] {
    width: 100%;
    margin-top: 0.5rem;
}

.service-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* === Inline messages === */
.form-message {
    display: none;
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-message.visible {
    display: block;
}

.form-message.error {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #f87171;
}

.form-message.success {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #4ade80;
}

/* === Contribution amount field (conditionally shown) === */
.contribution-amount-group {
    display: none;
}

.contribution-amount-group.visible {
    display: block;
}

/* === Service dashboard (locked-in profile / placeholder) === */
.service-dashboard h3 {
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.service-welcome {
    color: var(--color-light-gray);
    margin-bottom: 2rem;
}

.profile-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 480px) {
    .profile-summary {
        grid-template-columns: 1fr;
    }
}

.profile-summary-item {
    background: var(--color-dark-gray);
    border-radius: 8px;
    padding: 1.1rem 1.3rem;
}

.profile-summary-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-light-gray);
    margin-bottom: 0.35rem;
}

.profile-summary-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-gold);
}

.service-placeholder {
    background: var(--color-dark-gray);
    border-left: 3px solid var(--color-gold);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-light-gray);
    line-height: 1.7;
}

.service-dashboard-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.service-dashboard-actions .btn {
    flex: 1;
    min-width: 160px;
    text-align: center;
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-light-gray);
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: underline;
    padding: 0.5rem;
}

.btn-text:hover {
    color: var(--color-gold);
}

.logged-in-bar {
    text-align: right;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--color-light-gray);
}
