/* Contact Form Styles */

.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    backdrop-filter: blur(10px);
}

/* Form Grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

/* Form Groups */
.form-group {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-label.required::after {
    content: ' *';
    color: #ef4444;
}

/* Form Inputs */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-normal);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

/* Select Dropdown */
.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

/* Select Options - ensure visibility */
.form-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Checkbox */
.form-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Honeypot (hidden spam trap) */
.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Submit Button */
.form-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.form-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(100, 116, 139, 0.3);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-submit.loading {
    pointer-events: none;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
}

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

/* Field Errors */
.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.field-error {
    display: block;
    margin-top: 0.5rem;
    color: #ef4444;
    font-size: 0.875rem;
}

/* Form Messages */
.form-message {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: slideInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.form-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.form-message-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(100, 116, 139, 0.2));
    border: 2px solid rgba(16, 185, 129, 0.6);
    color: #10b981;
    position: relative;
    z-index: 100;
}

.form-message-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #dc2626;
}

.message-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-icon-svg {
    width: 2rem;
    height: 2rem;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.form-message-success .message-icon-svg {
    color: #10b981;
}

.form-message-error .message-icon-svg {
    color: #ef4444;
}

.message-content {
    flex: 1;
}

.message-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.message-text {
    margin: 0;
    line-height: 1.6;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Form Footer */
.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Alternative Contact Methods */
.contact-alternatives {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.alternatives-title {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.alternatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.alternative-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.alternative-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.alternative-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.alternative-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.alternative-value {
    font-weight: 600;
    color: var(--text-primary);
}

.alternative-value a {
    color: var(--primary);
    text-decoration: none;
}

.alternative-value a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-form {
        padding: 2rem;
    }

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

    .form-submit {
        font-size: 1rem;
    }

    .alternatives-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .contact-form-wrapper {
        padding: 2rem 0;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Dark Theme Adjustments */
body[data-theme="dark"] .form-input,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] .form-textarea {
    background: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

body[data-theme="dark"] .form-select option {
    background: #1a1f2e;
    color: #e2e8f0;
}

/* Light theme select arrow */
body[data-theme="light"] .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

body[data-theme="light"] .form-select option {
    background: #ffffff;
    color: #1e293b;
}
