/* SmartLetter Frontend Styles */

.sml-form-wrap {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.sml-form-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
}

.sml-form-desc {
    margin: 0 0 16px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

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

.sml-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.sml-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.15);
}

.sml-btn {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.sml-btn:hover {
    background: #005a87;
}

.sml-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sml-msg {
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

.sml-msg.sml-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sml-msg.sml-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Widget adjustments */
.sml-widget .sml-form-wrap {
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: 100%;
}

/* Popup */
#sml-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: smlFadeIn 0.3s;
}

@keyframes smlFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sml-popup {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
    animation: smlSlideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

@keyframes smlSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sml-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

[dir="rtl"] .sml-popup-close {
    right: auto;
    left: 12px;
}

.sml-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.sml-popup-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 12px;
}

.sml-popup .sml-form-title {
    text-align: center;
}

.sml-popup .sml-form-desc {
    text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
    .sml-popup {
        padding: 24px 20px;
        margin: 0 10px;
    }
}

/* RTL Support */
[dir="rtl"] .sml-form-wrap {
    text-align: right;
}

[dir="rtl"] .sml-input {
    text-align: right;
}
