/* ========================================
   StemiTV Dedication Page - Modern Form Styles
   ======================================== */

/* ===== CSS Custom Properties ===== */
:root {
    --dedication-max-width: 800px;
    --dedication-card-bg: #ffffff;
    --dedication-card-radius: 16px;
    --dedication-card-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --dedication-primary: #3b82f6;
    --dedication-primary-dark: #2563eb;
    --dedication-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dedication-text: #1e293b;
    --dedication-text-secondary: #64748b;
    --dedication-border: #e2e8f0;
    --dedication-input-bg: #f8fafc;
    --dedication-success: #10b981;
}

/* Dark Mode */
[data-theme="dark"] {
    --dedication-card-bg: rgba(30, 41, 59, 0.95);
    --dedication-card-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --dedication-text: #f1f5f9;
    --dedication-text-secondary: #94a3b8;
    --dedication-border: #475569;
    --dedication-input-bg: rgba(51, 65, 85, 0.8);
}

/* ===== Page Container ===== */
.dedication-container {
    max-width: var(--dedication-max-width);
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ===== Page Header ===== */
.dedication-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dedication-header h1 {
    font-size: 3.5rem !important;
    font-weight: 700;
    color: var(--dedication-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.dedication-header h1 i {
    background: var(--dedication-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dedication-header p {
    color: var(--dedication-text-secondary);
    font-size: 1rem;
}

/* ===== Form Card ===== */
.dedication-form-card {
    background: var(--dedication-card-bg);
    border-radius: var(--dedication-card-radius);
    box-shadow: var(--dedication-card-shadow);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

/* ===== Form Sections ===== */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--dedication-border);
}

.form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dedication-text);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: var(--dedication-primary);
    font-size: 1rem;
}

/* ===== Form Groups ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dedication-text);
    margin-bottom: 0.5rem;
}

.form-label-hint {
    font-weight: 400;
    color: var(--dedication-text-secondary);
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
}

/* ===== Form Inputs ===== */
.dedication-input,
.dedication-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--dedication-border);
    border-radius: 10px;
    background: var(--dedication-input-bg);
    color: var(--dedication-text);
    transition: all 0.2s ease;
    outline: none;
}

.dedication-input:focus,
.dedication-select:focus {
    border-color: var(--dedication-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: var(--dedication-card-bg);
}

.dedication-input::placeholder {
    color: var(--dedication-text-secondary);
}

/* Select styling */
.dedication-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

/* Input row for side-by-side inputs */
.input-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.input-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 1rem;
}

/* ===== Radio Button Groups ===== */
.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--dedication-input-bg);
    border: 2px solid var(--dedication-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
}

.radio-option:hover {
    border-color: var(--dedication-primary);
    background: rgba(59, 130, 246, 0.05);
}

.radio-option input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--dedication-primary);
    margin-right: 0.75rem;
    cursor: pointer;
}

.radio-option-label {
    font-size: 0.9375rem;
    color: var(--dedication-text);
    cursor: pointer;
}

.radio-option:has(input:checked) {
    border-color: var(--dedication-primary);
    background: rgba(59, 130, 246, 0.1);
}

/* ===== Submit Button ===== */
.dedication-submit-wrapper {
    margin-top: 2rem;
    text-align: center;
}

.dedication-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--dedication-gradient);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.dedication-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.dedication-submit-btn:active {
    transform: translateY(0);
}

.dedication-submit-btn i {
    font-size: 1.25rem;
}

/* ===== Amount Input Special Style ===== */
.amount-input-wrapper {
    position: relative;
}

.amount-input-wrapper .currency-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 600;
    color: var(--dedication-text-secondary);
}

.amount-input-wrapper .dedication-input {
    padding-left: 3.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

/* ===== Responsive Design ===== */
@media (max-width: 640px) {
    .dedication-container {
        margin: 1rem auto;
    }

    .dedication-form-card {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .dedication-header h1 {
        font-size: 2.25rem;
    }

    .input-row,
    .input-row-3 {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        min-width: auto;
    }

    .dedication-submit-btn {
        width: 100%;
        padding: 1rem 2rem;
    }
}

/* ===== Hide original form-card styles ===== */
.dedication-page .form-card {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dedication-page .form-card li {
    display: contents;
}

.dedication-page .form-card .form-title {
    display: none;
}

.dedication-page .form-card .form-control {
    display: none;
}

/* ===== Additional Animation ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.dedication-form-card {
    animation: fadeInUp 0.5s ease-out;
}

.form-section {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.form-section:nth-child(1) {
    animation-delay: 0.1s;
}

.form-section:nth-child(2) {
    animation-delay: 0.2s;
}

.form-section:nth-child(3) {
    animation-delay: 0.3s;
}

.form-section:nth-child(4) {
    animation-delay: 0.4s;
}

.form-section:nth-child(5) {
    animation-delay: 0.5s;
}