/* ═══════════════════════════════════════════════════════════════
   Temple — Rich forms (mobile-first, professional)
   Uses design tokens from temple-theme.css
   ═══════════════════════════════════════════════════════════════ */

.theme-ayyappa .temple-form-card {
    border: 1px solid var(--temple-border-light) !important;
    border-radius: var(--temple-radius-xl) !important;
    box-shadow: var(--temple-shadow) !important;
    overflow: hidden;
}

.theme-ayyappa .temple-form-card .card-body {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .theme-ayyappa .temple-form-card .card-body {
        padding: 1.75rem 2rem;
    }
}

.theme-ayyappa .temple-rich-form .temple-form-section + .temple-form-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--temple-border-light);
}

.theme-ayyappa .temple-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--temple-red-dark);
    margin: 0 0 1rem;
    letter-spacing: 0.01em;
}

.theme-ayyappa .temple-form-section-title::before {
    content: '';
    width: 4px;
    height: 1.1em;
    border-radius: 4px;
    background: var(--temple-gradient-gold);
    flex-shrink: 0;
}

.theme-ayyappa .temple-field {
    margin-bottom: 1.125rem;
}

.theme-ayyappa .temple-field .form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--temple-text-soft);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.theme-ayyappa .temple-field .form-label .text-danger {
    font-weight: 700;
}

.theme-ayyappa .temple-field .form-control,
.theme-ayyappa .temple-field textarea.form-control {
    border: 1.5px solid var(--temple-border-input) !important;
    border-radius: var(--temple-radius) !important;
    background-color: var(--temple-surface) !important;
    min-height: 52px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--temple-text);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-ayyappa .temple-field .form-select {
    border: 1.5px solid var(--temple-border-input) !important;
    border-radius: var(--temple-radius) !important;
    background-color: var(--temple-surface) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2364748B'%3e%3cpath d='M4.5 6l3.5 3.5L11.5 6' stroke='%2364748B' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.875rem center !important;
    background-size: 1rem 1rem !important;
    min-height: 52px;
    padding: 0.75rem 2.75rem 0.75rem 1rem !important;
    font-size: 1rem;
    color: var(--temple-text);
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-ayyappa .temple-field textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.theme-ayyappa .temple-field .form-control:focus,
.theme-ayyappa .temple-field .form-select:focus,
.theme-ayyappa .temple-field textarea.form-control:focus {
    border-color: var(--temple-red) !important;
    box-shadow: var(--temple-focus-ring) !important;
    outline: none;
}

.theme-ayyappa .temple-field .form-control-lg,
.theme-ayyappa .temple-field .form-select-lg {
    min-height: 56px;
    font-size: 1.0625rem;
    font-weight: 600;
}

.theme-ayyappa .temple-field .form-select-lg {
    padding-right: 3rem !important;
    background-position: right 1rem center !important;
}

/* Dropdown wrapper — visible chevron even if theme layers override background-image */
.theme-ayyappa .temple-select-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.theme-ayyappa .temple-select-wrap .form-select {
    width: 100%;
}

.theme-ayyappa .temple-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.65rem;
    height: 0.65rem;
    pointer-events: none;
    transform: translateY(-65%) rotate(45deg);
    border-right: 2px solid #64748B;
    border-bottom: 2px solid #64748B;
}

.theme-ayyappa .temple-select-wrap:focus-within::after {
    border-color: var(--temple-red);
}

.theme-ayyappa .temple-field-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--temple-muted);
    line-height: 1.4;
}

.theme-ayyappa .temple-field .validation-message {
    margin-top: 0.35rem;
    font-size: 0.75rem;
}

/* Amount quick-pick chips */
.theme-ayyappa .temple-amount-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

@media (min-width: 400px) {
    .theme-ayyappa .temple-amount-chips {
        grid-template-columns: repeat(2, 1fr);
    }
}

.theme-ayyappa .temple-amount-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--temple-border-light);
    border-radius: var(--temple-radius);
    background: var(--temple-surface);
    color: var(--temple-red-dark);
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--temple-shadow-sm);
}

.theme-ayyappa .temple-amount-chip:hover,
.theme-ayyappa .temple-amount-chip.active {
    border-color: var(--temple-red);
    background: var(--temple-parchment);
    box-shadow: var(--temple-shadow);
}

/* Payment mode cards */
.theme-ayyappa .temple-pay-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.theme-ayyappa .temple-pay-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--temple-border-light);
    border-radius: var(--temple-radius);
    background: var(--temple-surface);
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-ayyappa .temple-pay-option:has(input:checked) {
    border-color: var(--temple-red);
    background: var(--temple-parchment);
    box-shadow: var(--temple-shadow-sm);
}

.theme-ayyappa .temple-pay-option input {
    margin-top: 0.2rem;
    accent-color: var(--temple-red);
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.theme-ayyappa .temple-pay-option-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--temple-text);
    line-height: 1.35;
}

.theme-ayyappa .temple-pay-option-desc {
    font-size: 0.75rem;
    color: var(--temple-muted);
    margin-top: 0.15rem;
}

/* Sidebar info card */
.theme-ayyappa .temple-side-card {
    border: 1px solid var(--temple-border-gold) !important;
    border-radius: var(--temple-radius-xl) !important;
    background: linear-gradient(160deg, var(--temple-surface) 0%, var(--temple-gold-pale) 100%) !important;
    box-shadow: var(--temple-shadow) !important;
}

.theme-ayyappa .temple-side-card .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--temple-red-dark);
    margin-bottom: 0.75rem;
}

/* Form actions — stack on mobile */
.theme-ayyappa .temple-form-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.625rem;
    margin-top: 1.5rem;
}

@media (min-width: 576px) {
    .theme-ayyappa .temple-form-actions {
        flex-direction: row;
    }
}

.theme-ayyappa .temple-form-actions .btn-primary {
    background: var(--temple-gradient-red) !important;
    border: none !important;
    border-radius: var(--temple-radius) !important;
    min-height: 52px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--temple-shadow);
}

.theme-ayyappa .temple-form-actions .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--temple-shadow-lg);
}

.theme-ayyappa .temple-form-actions .btn-secondary {
    border-radius: var(--temple-radius) !important;
    min-height: 52px;
    font-weight: 600;
    background: var(--temple-cream-dark) !important;
    border: 1.5px solid var(--temple-border-light) !important;
    color: var(--temple-text-soft) !important;
}

/* Global rich overrides for all pages */
.theme-ayyappa .card.shadow-sm,
.theme-ayyappa .card {
    border: 1px solid var(--temple-border-light) !important;
}

.theme-ayyappa .form-control,
.theme-ayyappa .form-select {
    border: 1.5px solid var(--temple-border-input) !important;
}

.theme-ayyappa .btn-primary {
    background: var(--temple-gradient-red) !important;
    border: none !important;
    border-radius: var(--temple-radius) !important;
    font-weight: 700;
    box-shadow: var(--temple-shadow-sm);
}

.theme-ayyappa .btn-primary:hover:not(:disabled),
.theme-ayyappa .btn-primary:focus {
    background: var(--temple-gradient-red) !important;
    filter: brightness(1.05);
}

.theme-ayyappa .btn-outline-primary {
    border-radius: var(--temple-radius) !important;
    border-width: 1.5px !important;
    border-color: var(--temple-red) !important;
    color: var(--temple-red-dark) !important;
    font-weight: 600;
    min-height: 44px;
}

.theme-ayyappa .btn-outline-primary:hover {
    background: var(--temple-parchment) !important;
    color: var(--temple-red-dark) !important;
}
