/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    font-family: inherit;
    
}

.chat-widget-button {
    background: linear-gradient(135deg, #000000 0%, #242425 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: var(--space-sm) var(--space-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 20px #66666641;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    min-width: 60px;
    justify-content: start;
    border-radius: 10px;
}

.chat-widget-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px #666666;
}

.chat-widget-button i {
    font-size: 18px;
}

.chat-widget-text {
    white-space: nowrap;
    transition: all 0.3s ease;
}

.chat-widget-pulse {
    position: absolute;
    top: 21px;
    right: 10px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 #ffffff;
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(160, 116, 120, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

/* RTL Support for chat widget */
[dir="rtl"] .chat-widget {
    left: 20px;
    right: auto;
}

/* Mobile responsive for chat widget */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 15px;
        right: 15px;
    }

    .chat-widget-button {
        padding: var(--space-md) var(--space-md);
        font-size: 13px;
    }

    .chat-widget-text {
        display: none;
    }

    [dir="rtl"] .chat-widget {
        left: 15px;
        right: auto;
    }
}

/* Instant Contact Form Styles */
.instant-contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.instant-contact-modal {
    background: white;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
    margin: auto;
    border: 1px solid #666666;
}

/* Custom scrollbar for modal */
.instant-contact-modal::-webkit-scrollbar {
    width: 5px;
}

.instant-contact-modal::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.instant-contact-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #666666 0%, #666666 100%);
    border-radius: 10px;
    border: 2px solid #f8f9fa;
}

.instant-contact-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #666666 0%, #666666 100%);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px !important;
    color: #ffffff !important;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.close-btn:hover {
  
    color: #000000 !important ;
}

.form-header {
    text-align: center;
    padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
    border-bottom: none;
    background: #111111;
    color: white;
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.form-header h3 {
    margin: 0 0 var(--space-sm);
    font-size: var(--font-size-2xl);
    font-weight: 600;
}

.form-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.instant-form {
    padding: var(--space-2xl);
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
}

.form-section {
    margin-bottom: 25px;
}

.form-section h4 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #666666;
    display: inline-block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-lg) var(--space-md);
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    background: #fafbfc;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b8c5d1;
    background: #ffffff;
    transform: translateY(-1px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: black;
    background: #ffffff;
    transform: translateY(-1px);
}

.instant-contact-modal .form-group textarea,
.form-group textarea {
    resize: vertical !important;
    min-height: 120px !important;
    line-height: 1.6 !important;
    font-family: inherit !important;
    scrollbar-width: thin !important;
    scrollbar-color: #667eea #f1f3f4 !important;
    border-radius: 50px 10px 50px 10px !important;
    padding: 20px 24px !important;
    font-size: 15px !important;
    letter-spacing: 0.2px !important;
    border: 4px solid #667eea !important;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15) !important;
    position: relative !important;
    transform: rotate(-2deg) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 8px) !important;
}

.instant-contact-modal .form-group textarea:focus,
.form-group textarea:focus {
    transform: rotate(0deg) scale(1.02) !important;
    border-color: #5a67d8 !important;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.25) !important;
    outline: none !important;
}

/* Custom scrollbar for webkit browsers */
.form-group textarea::-webkit-scrollbar {
    width: 8px;
}

.form-group textarea::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
}

.form-group textarea::-webkit-scrollbar-thumb {
    background: #666666;
    border-radius: 4px;
    border: 1px solid #f1f3f4;
}

.form-group textarea::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

/* Enhanced textarea styling */
.form-group textarea::placeholder {
    color: #6b7280;
    font-style: normal;
    opacity: 0.9;
    font-weight: 400;
    font-size: 14px;
}

.form-group textarea:focus::placeholder {
    opacity: 0.6;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.form-group textarea:hover::placeholder {
    color: black;
    opacity: 0.8;
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.radio-option:hover {
    border-color: black;
    background-color: #f8f9ff;
}

.radio-option input[type="radio"] {
    margin-right: 8px;
    margin-left: 0;
    width: auto;
    padding: 0;
}

.radio-option input[type="radio"]:checked+span {
    color: black;
    font-weight: 600;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: black;
    background-color: #f8f9ff;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-primary {
    background: #666666;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);

}

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

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.instant-success-message {
    text-align: center;
    padding: 40px;
    color: #28a745;
}

.instant-success-message i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.instant-success-message span {
    font-size: 18px;
    font-weight: 500;
}

/* RTL Support */
[dir="rtl"] .instant-contact-modal {
    text-align: right;
}

[dir="rtl"] .close-btn {
    left: 15px;
    right: auto;
}

[dir="rtl"] .radio-option input[type="radio"] {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .form-actions {
    justify-content: flex-start;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .instant-contact-overlay {
        padding: 10px;
    }

    .instant-contact-modal {
        max-height: 95vh;
        margin: 0;
    }

    .form-header {
        padding: 20px 20px 15px;
    }

    .form-header h3 {
        font-size: 20px;
    }

    .form-header p {
        font-size: 14px;
    }

    .instant-form {
        padding: 20px;
    }

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

    .radio-group {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-header {
        padding: 15px;
    }

    .form-header h3 {
        font-size: 18px;
    }

    .instant-form {
        padding: 15px;
    }

    .form-section h4 {
        font-size: 16px;
    }
}

/* Animation for form elements */
.form-group {
    animation: slideInUp 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

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

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

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

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

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

/* Focus styles for accessibility */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.radio-option:focus-within {
    outline: 2px solid black;
    outline-offset: 2px;
}

/* Loading state */
.btn-primary:disabled::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Contact Info Styles for Widget */
.contact-info {
    padding: 20px;
}

.contact-info p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 14px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid black;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-method:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.contact-method i {
    color: black;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.contact-method span {
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

/* Modern Textarea Styles */
.modern-textarea-container {
    position: relative;
    margin: var(--space-lg) 0;
}

.modern-textarea {
    width: 100% !important;
    min-height: 140px !important;
    padding: 20px 24px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    line-height: 1.6 !important;
    color: #080808 !important;
    resize: vertical !important;
    position: relative !important;
    z-index: 1 !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.modern-textarea::placeholder {
    color: #9c9c9c !important;
    font-style: italic !important;
    opacity: 0.8 !important;
    transition: all 0.3s ease !important;
}


.textarea-border-animation {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 16px !important;
    background-size: 200% 200% !important;
    opacity: 0 !important;
    transition: opacity 0.4s ease !important;
    z-index: 0 !important;
    pointer-events: none !important;
    animation: borderGlow 3s ease-in-out infinite !important;
}

@keyframes borderGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Custom scrollbar for modern textarea */
.modern-textarea::-webkit-scrollbar {
    width: 8px !important;
}

.modern-textarea::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 4px !important;
}



/* Dark mode support for modern textarea */
@media (prefers-color-scheme: dark) {
    .modern-textarea {
        color: #000000 !important;
    }
}

/* Mobile responsive for modern textarea */
@media (max-width: 768px) {
    .modern-textarea {
        min-height: 120px !important;
        padding: 16px 20px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
    }
}


.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: #777;   
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10000;
  }
  .close-btn:hover {
    color: #333;      
  }
  .chat-widget-button i {
    color: #ffffff !important;
}