/* Dardini Chat Widget Styles */

/* Chat Widget Toggle Button */
.dardini-chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #E2B977 0%, #E4C38E 100%);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(232, 168, 79, 0.4);
    transition: all 0.3s ease;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.dardini-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(232, 168, 79, 0.5);
}

.dardini-chat-toggle:active {
    transform: scale(0.95);
}

.dardini-chat-toggle svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.dardini-chat-toggle.active {
    background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%);
}

/* Chat Widget Container */
.dardini-chat-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999999;
    overflow: hidden;
}

.dardini-chat-widget.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Widget Header */
.dardini-chat-header {
    background: linear-gradient(135deg, #E8A84F 0%, #D9973E 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dardini-chat-header-content {
    flex: 1;
}

.dardini-chat-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.dardini-chat-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.95;
    color: white;
}

.dardini-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    padding: 0;
    font-size: 24px;
    line-height: 1;
}

.dardini-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Widget Body */
.dardini-chat-body {
    padding: 24px;
    max-height: 480px;
    overflow-y: auto;
}

/* Form Styles */
.dardini-chat-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dardini-chat-form-group {
    display: flex;
    flex-direction: column;
}

.dardini-chat-form label {
    font-size: 14px;
    font-weight: 500;
    color: #2C2C2C;
    margin-bottom: 6px;
    display: block;
}

.dardini-chat-form input,
.dardini-chat-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.dardini-chat-form input:focus,
.dardini-chat-form textarea:focus {
    outline: none;
    border-color: #E8A84F;
    box-shadow: 0 0 0 3px rgba(232, 168, 79, 0.1);
}

.dardini-chat-form input::placeholder,
.dardini-chat-form textarea::placeholder {
    color: #999;
}

.dardini-chat-form textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Checkbox */
.dardini-chat-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0;
}

.dardini-chat-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    cursor: pointer;
    accent-color: #E8A84F;
}

.dardini-chat-checkbox label {
    font-size: 12px;
    color: #666;
    margin: 0;
    flex: 1;
    line-height: 1.5;
    cursor: pointer;
}

/* Submit Button */
.dardini-chat-submit {
    background: linear-gradient(135deg, #E8A84F 0%, #D9973E 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    width: 100%;
}

.dardini-chat-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 168, 79, 0.3);
}

.dardini-chat-submit:active:not(:disabled) {
    transform: translateY(0);
}

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

/* Phone Link */
.dardini-chat-phone {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F0F0F0;
}

.dardini-chat-phone p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
}

.dardini-chat-phone a {
    color: #E8A84F;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s ease;
}

.dardini-chat-phone a:hover {
    color: #D9973E;
    text-decoration: underline;
}

/* Alert Messages */
.dardini-chat-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
    animation: slideInDown 0.3s ease;
}

.dardini-chat-alert.show {
    display: block;
}

.dardini-chat-alert.success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.dardini-chat-alert.error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

/* Loading Spinner */
.dardini-chat-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

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

/* Powered by Salesmsg */
.dardini-chat-footer {
    text-align: center;
    padding: 12px;
    background: #F8F8F8;
    border-top: 1px solid #E0E0E0;
}

.dardini-chat-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dardini-chat-footer-link:hover {
    color: #E8A84F;
}

.dardini-chat-footer-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .dardini-chat-widget {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 90px;
    }

    .dardini-chat-toggle {
        right: 10px;
        bottom: 20px;
        width: 56px;
        height: 56px;
    }

    .dardini-chat-toggle svg {
        width: 28px;
        height: 28px;
    }

    .dardini-chat-body {
        max-height: calc(100vh - 280px);
    }

    .dardini-chat-header {
        padding: 16px;
    }

    .dardini-chat-header h3 {
        font-size: 16px;
    }

    .dardini-chat-body {
        padding: 20px;
    }
}

/* Custom Scrollbar */
.dardini-chat-body::-webkit-scrollbar {
    width: 6px;
}

.dardini-chat-body::-webkit-scrollbar-track {
    background: #F5F5F5;
}

.dardini-chat-body::-webkit-scrollbar-thumb {
    background: #D0D0D0;
    border-radius: 3px;
}

.dardini-chat-body::-webkit-scrollbar-thumb:hover {
    background: #B0B0B0;
}

/* Accessibility */
.dardini-chat-toggle:focus,
.dardini-chat-close:focus,
.dardini-chat-submit:focus {
    outline: 2px solid #E8A84F;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .dardini-chat-widget,
    .dardini-chat-toggle {
        display: none !important;
    }
}
