@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

.contact-form {
    /*max-width: 100%;*/
    /*width: 100%;*/
    background: none;
    border: 1px solid #2a2e38;
    padding: clamp(20px, 5vw, 35px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.agent-status-container {
    margin-bottom: 20px;
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #0d1114;
    border: 1px solid #2a2e38;
}

.status-indicator {
    width: 10px;
    height: 10px;
    background: #8892a0;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: #00ffab;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    border-radius: 50%
}

.status-indicator.online {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    border-radius: 50%
}

.status-text {
    color: #e4e6eb;
    font-size: 14px;
    font-weight: 500;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1400px) {
    .form-group:not(.phone-group):not(.message-group) {
        flex-direction: row;
        align-items: flex-start;
                margin-top: 2em;
        gap: 20px;
    }
    
    .form-group label {
        width: 160px;
        flex-shrink: 0;
        text-align: right;
        padding-top: 12px;
    }
    
    .form-group input:not([type="checkbox"]):not([type="radio"]),
    .form-group textarea,
    .form-group select,
    .phone-input-wrapper {
        flex: 1;
        min-width: 0;
    }
    
    .form-row {
        flex-direction: row;
        gap: 20px;
    }
    
    .form-group.half {
        flex: 1;
        flex-direction: column;
        margin-bottom: 0;
    }
    
    .form-group.half label {
        width: auto;
        text-align: left;
        padding-top: 0;
        margin-bottom: 8px;
    }
    
    .phone-group {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }
    
    .phone-group label {
        width: 160px;
        flex-shrink: 0;
        text-align: right;
        padding-top: 12px;
    }
    
    .message-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .message-group label {
        width: auto !important;
        text-align: left !important;
        padding-top: 0 !important;
        margin-bottom: 8px !important;
    }
    
    .message-group textarea,
    .message-group .editor-preview {
        width: 100% !important;
        flex: none !important;
    }
}

.form-group.half {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e4e6eb;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #13171a;
    border: 1px solid #2a2e38;
    color: #ffffff;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.phone-group .phone-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

@media (min-width: 480px) {
    .phone-group .phone-input-wrapper {
        flex-direction: row;
    }
}

.country-select {
    width: 100%;
}

@media (min-width: 480px) {
    .country-select {
        width: 150px;
        flex-shrink: 0;
    }
}

.phone-input {
    flex: 1;
    min-width: 0;
}

/* Editor Toolbar */
.editor-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding: 10px;
    background: #0d1114;
    border: 1px solid #2a2e38;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 8px 12px;
    background: #1a1f24;
    border: 1px solid #2a2e38;
    color: #e4e6eb;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.toolbar-btn .material-icons {
    font-size: 18px;
}

.toolbar-btn:hover {
    background: #2a2e38;
    border-color: #3b82f6;
}

.language-select {
    padding: 8px 12px;
    background: #1a1f24;
    border: 1px solid #2a2e38;
    color: #e4e6eb;
    font-size: 14px;
    cursor: pointer;
    margin-left: auto;
}

/* Editor Preview */
.editor-preview {
    margin-top: 15px;
    padding: 15px;
    background: #0d1114;
    border: 1px solid #2a2e38;
    color: #e4e6eb;
    font-size: 14px;
    line-height: 1.6;
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.editor-preview.active {
    display: block;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn .material-icons {
    font-size: 20px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a1f2491;
    border: 1px solid #2a2e38;
    padding: clamp(25px, 8vw, 40px);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-checkmark {
    margin-bottom: 20px;
}

.checkmark {
    width: 80px;
    height: 80px;
}

.checkmark-circle {
    stroke: #10b981;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: #10b981;
    stroke-width: 2;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

.success-title {
    color: #fff;
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 10px;
}

.success-message {
    color: #a0a8b4;
    font-size: clamp(14px, 4vw, 16px);
    line-height: 1.6;
    margin-bottom: 30px;
}

.close-modal-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.close-modal-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: min(380px, calc(100vw - 40px));
    background: #1a1f24;
    border: 1px solid #2a2e38;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 999;
    overflow: hidden;
}

@media (max-width: 640px) {
    .chat-widget {
        right: 15px;
        left: 15px;
        width: auto;
    }
}

.chat-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #1a1f24 0%, #0d1114 100%);
    border-bottom: 1px solid #2a2e38;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: 600;
}

.chat-header .material-icons {
    margin-right: 8px;
    color: #3b82f6;
    font-size: 20px;
    vertical-align: middle;
}

#chatStatusBadge {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    background: #ff6565;
    color: #000000
}

#chatStatusBadge.online {
    background: #19ff77
}

.chat-body {
    max-height: 500px;
    overflow-y: auto;
}

/* Chat Profile */
.chat-profile {
    padding: 0;
}

.profile-header {
    position: relative;
}

.profile-cover {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    overflow: hidden;
}

.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-wrapper {
    position: relative;
    margin-top: -40px;
    padding: 0 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border: 3px solid #1a1f24;
    object-fit: cover;
    background: #2a2e38;
}

.profile-info-chat {
    padding: 15px 20px 20px;
}

.profile-info-chat h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 4px;
}

.profile-info-chat p {
    color: #8892a0;
    font-size: 13px;
    margin-bottom: 15px;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 400px) {
    .profile-actions {
        flex-direction: row;
    }
}

.btn-start-chat {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-start-chat:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-settings {
    padding: 10px 15px;
    background: #2a2e38;
    color: #e4e6eb;
    border: none;
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background 0.2s;
}

.btn-settings:hover {
    background: #3a3e48;
    color: #fff;
}

.btn-settings .material-icons {
    font-size: 18px;
}

/* Chat Auth */
.chat-auth {
    padding: 30px 20px;
    text-align: center;
}

.chat-auth p {
    color: #8892a0;
    margin-bottom: 20px;
}

.google-login-btn,
.github-login-btn,
.signup-btn,
.login-btn {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #2a2e38;
    background: #13171a;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, border-color 0.2s;
}

.google-login-btn:hover,
.github-login-btn:hover,
.signup-btn:hover,
.login-btn:hover {
    background: #1a1f24;
    border-color: #3b82f6;
}

.google-login-btn img,
.github-login-btn img {
    width: 20px;
    height: 20px;
}

.auth-separator {
    color: #8892a0;
    margin: 15px 0;
    position: relative;
}

.auth-separator:before,
.auth-separator:after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #2a2e38;
}

.auth-separator:before {
    left: 0;
}

.auth-separator:after {
    right: 0;
}

/* Chat Messages */
.chat-messages {
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    background: #0d1114;
}

.message {
    margin-bottom: 12px;
    padding: 10px 14px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.sent {
    background: #3b82f6;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.message.received {
    background: #2a2e38;
    color: #e4e6eb;
    border-bottom-left-radius: 0;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #1a1f24;
    border-top: 1px solid #2a2e38;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    background: #13171a;
    border: 1px solid #2a2e38;
    color: #fff;
    font-size: 14px;
}

.chat-input input:focus {
    outline: none;
    border-color: #3b82f6;
}

.chat-input button {
    width: 45px;
    height: 45px;
    background: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input button:hover {
    background: #2563eb;
}

.chat-input button .material-icons {
    font-size: 20px;
}

/* Form Message */
.form-message {
    margin-top: 15px;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .editor-toolbar {
        gap: 3px;
        padding: 8px;
    }
    
    .toolbar-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 32px;
    }
    
    .language-select {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 10px 14px;
    }
}


/* Update the base form-group styles for inputs */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #13171a;
    border: 1px solid #2a2e38;
    color: #ffffff;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}



.editor-preview {
    margin-top: 15px;
    padding: 15px;
    background: #0d1114;
    border: 1px solid #2a2e38;
    color: #e4e6eb;
    font-size: 14px;
    line-height: 1.6;
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.editor-preview.active {
    display: block;
}

#message {
    width: 100% !important;
    box-sizing: border-box !important;
}



