/* Stripe Form Styles */
.stripe-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Password Protection Styles */
.password-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.password-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.password-card h1 {
    color: #333;
    margin-bottom: 1rem;
    font-family: 'Bitter', serif;
}

.password-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.password-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.password-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.password-form button {
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.password-form button:hover {
    background: #0056b3;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Main Form Styles */
.form-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-container h1 {
    color: #333;
    margin-bottom: 2rem;
    font-family: 'Bitter', serif;
    text-align: center;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h2 {
    color: #333;
    margin-bottom: 1rem;
    font-family: 'Bitter', serif;
    font-size: 1.25rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Conditional Fields Animation */
.conditional-fields {
    overflow: hidden;
    transition: all 0.3s ease;
}

.conditional-fields.show {
    display: block !important;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.submit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 200px;
}

.submit-btn:hover:not(:disabled) {
    background: #0056b3;
}

.submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Section */
.results-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.results-container h2 {
    color: #28a745;
    margin-bottom: 2rem;
    font-family: 'Bitter', serif;
    text-align: center;
}

.result-group {
    margin-bottom: 2rem;
}

.result-group h3 {
    color: #333;
    margin-bottom: 1rem;
    font-family: 'Bitter', serif;
    font-size: 1.1rem;
}

.link-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.link-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    font-size: 0.9rem;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #1e7e34;
}

.copy-btn.copied {
    background: #17a2b8;
}

#email-template {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 1rem;
}

.result-actions {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.secondary-btn:hover {
    background: #545b62;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stripe-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }

    .form-container,
    .results-section {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .password-form {
        flex-direction: column;
    }

    .link-container {
        flex-direction: column;
    }

    .password-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .form-container,
    .results-section {
        padding: 1rem;
    }

    .password-card {
        padding: 1rem;
    }

    .submit-btn {
        width: 100%;
    }
}

/* Success/Error States */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

/* Form Validation */
.form-group input:invalid:not(:focus):not(:placeholder-shown),
.form-group select:invalid:not(:focus),
.form-group textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #dc3545;
}

.form-group input:valid:not(:focus):not(:placeholder-shown),
.form-group select:valid:not(:focus),
.form-group textarea:valid:not(:focus):not(:placeholder-shown) {
    border-color: #28a745;
}
