/* Chat Widget Settings Page Styles */
.msg91-chat-widget-wrap {
    max-width: 1200px;
    margin: 20px 0;
}

.msg91-chat-widget-wrap h1 {
    color: #23282d;
    margin-bottom: 20px;
}

.msg91-widget-info {
    background: #f1f1f1;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.msg91-widget-info p {
    margin: 0;
    color: #555;
}

.msg91-chat-widget-wrap .form-table th {
    width: 200px;
    padding: 20px 10px 20px 0;
    vertical-align: top;
}

.msg91-chat-widget-wrap .form-table td {
    padding: 15px 10px;
}

.msg91-chat-widget-wrap .form-table input[type="text"],
.msg91-chat-widget-wrap .form-table input[type="number"] {
    width: 100%;
    max-width: 400px;
}

.msg91-chat-widget-wrap .form-table input[type="checkbox"] {
    margin-right: 8px;
}

/* .msg91-chat-widget-wrap .form-table label {
    font-weight: normal;
    display: flex;
    align-items: center;
} */

/* Preview Widget Button Visibility Classes */
.msg91-visible {
    display: inline-flex !important;
}

.msg91-hidden {
    display: none !important;
}

.msg91-chat-widget-wrap .description {
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

.required-field {
    color: #d63638;
    font-weight: bold;
}

.msg91-widget-preview {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.msg91-widget-preview h3 {
    margin-top: 0;
    color: #23282d;
}

.preview-code {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 10px;
}

.preview-code pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.preview-code code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.4;
}

/* Widget Token Validation Styles */
.widget-token-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.widget-token-container input[type="text"] {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

#widget-token-validation-message {
    display: block;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    width: fit-content;
    text-align: left;
}

#validate-widget-token {
    position: relative;
    min-width: 120px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#validate-widget-token.needs-validation {
    background-color: #ff6b6b !important;
    border-color: #ff5252 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

#validate-widget-token.validation-success {
    background-color: #4caf50 !important;
    border-color: #45a049 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    animation: successPulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 107, 107, 0.5);
    }
    100% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
}

@keyframes successPulse {
    0% {
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(76, 175, 80, 0.5);
    }
    100% {
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }
}

#validate-widget-token .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.validation-message {
    margin-top: 16px;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    display: block;
    width: fit-content;
    margin-bottom: 0;
    margin-left: 0;
    text-align: left;
}

.validation-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    width: fit-content;
    margin-left: 0;
    text-align: left;
}

.validation-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    width: fit-content;
    margin-left: 0;
    text-align: left;
}

.validation-message.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    width: fit-content;
    margin-left: 0;
    text-align: left;
}

.form-invalid {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 1px #d63638 !important;
    outline: none !important;
}

.form-valid {
    border-color: #00a32a !important;
    box-shadow: 0 0 0 1px #00a32a !important;
    outline: none !important;
}

.error-message {
    color: #d63638;
    font-size: 11px;
    margin-top: 3px;
    display: block;
    line-height: 1.2;
}

.hide {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .msg91-chat-widget-wrap .form-table th,
    .msg91-chat-widget-wrap .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .msg91-chat-widget-wrap .form-table th {
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    .widget-token-container {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .widget-token-container input[type="text"] {
        min-width: auto;
        margin-bottom: 0;
    }
    
    #validate-widget-token {
        width: 100%;
        height: 32px;
    }
    
    .validation-message {
        margin-top: 3px;
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .preview-code {
        font-size: 11px;
    }
}


