/* Floating Contact Form Styles */

/* Tab styling */
.floating-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-tab .tab-trigger {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 15px;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    box-shadow: -4px 0 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    min-height: 120px;
    user-select: none;
}

.floating-tab .tab-trigger:hover {
    transform: translateX(-5px);
    box-shadow: -8px 0 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.floating-tab .tab-text {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.floating-tab .tab-icon {
    font-size: 20px;
    margin-top: 5px;
}

/* Form overlay */
.floating-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 43, 76, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.floating-form-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Form container */
.floating-form-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(26, 43, 76, 0.3);
    z-index: 10001;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-form-container.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Form header */
.floating-form-header {
    background: linear-gradient(135deg, #1a2b4c 0%, #2c4a75 100%);
    color: white;
    padding: 25px;
    position: relative;
    text-align: center;
}

.floating-form-header h3 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.close-form {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-form:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Form content */
.floating-form-content {
    padding: 30px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.form-description {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Form styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #1a2b4c;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #a0aec0;
}

.field-error {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 4px;
    display: none;
}

.field-error.show {
    display: block;
}

/* Privacy notice */
.privacy-notice {
    margin: 20px 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4a5568;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-container input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-container input:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.privacy-notice a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

/* Submit button */
.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 20px;
    height: 20px;
    color: white;
}

/* Success step */
.success-step {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.success-step h4 {
    color: #1a2b4c;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
}

.success-step > p {
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* CTA section */
.cta-section {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid #e2e8f0;
}

.cta-section h5 {
    color: #1a2b4c;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
}

.cta-section > p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.cta-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    text-decoration: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
    text-decoration: none;
    color: white;
}

.cta-button small {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
}

/* Reset button */
.reset-form {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.reset-form:hover {
    border-color: #cbd5e0;
    color: #4a5568;
}

/* Responsive design */
@media (max-width: 768px) {
    .floating-tab {
        right: 10px;
    }
    
    .floating-tab .tab-trigger {
        padding: 15px 12px;
        min-height: 100px;
    }
    
    .floating-tab .tab-text {
        font-size: 12px;
    }
    
    .floating-tab .tab-icon {
        font-size: 18px;
    }
    
    .floating-form-container {
        width: 95%;
        margin: 0 10px;
    }
    
    .floating-form-header {
        padding: 20px;
    }
    
    .floating-form-header h3 {
        font-size: 1.2rem;
        padding-right: 40px;
    }
    
    .floating-form-content {
        padding: 20px;
    }
    
    .cta-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .floating-form-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
    
    .floating-form-container.active {
        transform: none;
    }
    
    .floating-form-content {
        max-height: calc(100vh - 80px);
    }
    
    .checkbox-container {
        gap: 8px;
    }
    
    .checkmark {
        width: 18px;
        height: 18px;
    }
}

/* Animation for form transitions */
.form-step {
    transition: all 0.4s ease;
}

.form-step.hiding {
    opacity: 0;
    transform: translateX(-20px);
}

.success-step {
    transition: all 0.4s ease;
}

.success-step.showing {
    opacity: 1;
    transform: translateX(0);
}

/* Loading states */
.contact-form.submitting {
    pointer-events: none;
    opacity: 0.7;
}

/* Focus indicators for accessibility */
.floating-tab .tab-trigger:focus-visible,
.close-form:focus-visible,
.submit-btn:focus-visible,
.reset-form:focus-visible,
.cta-button:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-tab,
    .floating-form-container,
    .floating-form-overlay,
    .form-step,
    .success-step,
    .submit-btn,
    .cta-button,
    .close-form {
        transition: none;
    }
    
    .submit-btn:hover,
    .cta-button:hover {
        transform: none;
    }
}