/* Public Form Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #333;
}

.container {
    width: 100%;
    max-width: 700px;
}

/* Cards */
.form-card,
.prompt-card,
.success-card,
.error-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 3rem;
    animation: fadeInUp 0.4s ease-out;
}

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

/* Form Title */
.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
}

/* Form Content */
#formContent {
    margin-bottom: 2rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.95rem;
}

.form-field label .required {
    color: #d32f2f;
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: #d32f2f;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* Label Fields */
.label-field {
    padding: 1rem;
    background: #f5f5f5;
    border-left: 4px solid #667eea;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    border-radius: 4px;
}

/* Field Errors */
.field-error {
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: #fff;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    flex: 1;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-large {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* Error Messages */
.error-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffebee;
    border-left: 4px solid #d32f2f;
    border-radius: 4px;
}

.error-container h3 {
    color: #c62828;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.error-container ul {
    list-style: none;
    padding: 0;
}

.error-container li {
    color: #c62828;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Password Prompt */
.password-prompt {
    text-align: center;
}

.prompt-card h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #333;
}

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

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

.prompt-card .btn {
    width: 100%;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Success Message */
.success-container {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease-out;
}

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

.success-card h2 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 0.5rem;
}

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

.success-card .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* Error Screen */
.error-screen {
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: #d32f2f;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
}

.error-card h2 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.error-card p {
    color: #666;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    color: #fff;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .form-card,
    .prompt-card,
    .success-card,
    .error-card {
        padding: 2rem 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

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

    .btn {
        width: 100%;
    }
}
/* PHASE 5: Email Preview Styles */
.email-preview-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 2rem 0 1.5rem 0;
    overflow: hidden;
}

.email-preview-header {
    background: #f0f7ff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.email-preview-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a73e8;
    margin: 0;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1rem;
    color: #1a73e8;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.3s ease;
}

.toggle-btn[aria-expanded="true"] {
    transform: rotate(180deg);
}

.email-preview-content {
    padding: 1rem 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.email-preview-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    border-left: 4px solid #1a73e8;
}

.email-preview-card.recipient-email {
    border-left-color: #34a853;
}

.email-type-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a73e8;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.email-preview-card.recipient-email .email-type-label {
    color: #34a853;
}

.email-preview-item {
    margin-bottom: 1rem;
}

.email-preview-item:last-child {
    margin-bottom: 0;
}

.email-field-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.email-field-value {
    font-size: 0.95rem;
    color: #333;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    word-break: break-word;
}

.email-body-preview {
    font-size: 0.9rem;
    color: #333;
    padding: 1rem;
    background: #fafbfc;
    border-radius: 4px;
    border: 1px solid #e8eaed;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}
@media (max-width: 480px) {
    .form-card,
    .prompt-card,
    .success-card,
    .error-card {
        padding: 1.5rem 1rem;
    }

    .form-title {
        font-size: 1.25rem;
    }
}
