/* Mehrovafa SMS System Frontend Stylesheet */

.mehrovafa-sms-container {
    width: 100%;
    max-width: 450px;
    margin: 30px auto;
    font-family: vazir, 'vazir', 'Vazirmatn', sans-serif !important;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.mehrovafa-sms-container * {
    box-sizing: border-box;
    font-family: vazir, 'vazir', 'Vazirmatn', sans-serif !important;
}

/* Card Styling */
.mehrovafa-sms-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    padding: 30px 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mehrovafa-sms-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Card Header */
.mehrovafa-sms-card-header {
    text-align: center;
    margin-bottom: 25px;
}

.mehrovafa-sms-card-header .card-header-icon {
    font-size: 44px;
    width: 44px;
    height: 44px;
    color: #5a0000;
    margin-bottom: 12px;
    display: inline-block;
}

.mehrovafa-sms-card-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.mehrovafa-sms-card-header .card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Form Fields */
.mehrovafa-sms-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-weight: 600;
    font-size: 13px;
    color: #334155;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    right: 12px;
    color: #94a3b8;
    width: 18px;
    height: 18px;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 42px 12px 16px;
    border-radius: 12px;
    border: 1.5px solid #dbcfcf;
    background-color: #f8fafc;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: all 0.25s;
    font-family: inherit;
}

.input-with-icon input:focus {
    border-color: #a23c3c;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(90, 0, 0, 0.08);
}

/* Captcha Field styling */
.captcha-input-group {
    display: flex;
    gap: 8px;
}

.captcha-input-group input {
    flex-grow: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid #dbcfcf;
    background-color: #f8fafc;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: all 0.25s;
    -moz-appearance: textfield;
    font-family: inherit;
}

.captcha-input-group input::-webkit-outer-spin-button,
.captcha-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.captcha-input-group input:focus {
    border-color: #a23c3c;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(90, 0, 0, 0.08);
}

.refresh-captcha-btn {
    background: #f1f5f9;
    border: 1.5px solid #dbcfcf;
    border-radius: 12px;
    width: 46px;
    height: 46px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
    padding: 0;
}

.refresh-captcha-btn:hover:not(:disabled) {
    background: #e2e8f0;
    color: #1e293b;
}

.refresh-captcha-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.refresh-captcha-btn .refresh-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.refresh-captcha-btn.rotating .refresh-icon {
    animation: rotate 0.8s linear infinite;
}

/* Submit Button */
.mehrovafa-submit-btn {
    background: linear-gradient(135deg, #7f1212 0%, #5a0000 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(90, 0, 0, 0.25);
    width: 100%;
    margin-top: 10px;
    font-family: inherit;
}

.mehrovafa-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #9c1f1f 0%, #750000 100%);
    box-shadow: 0 6px 16px rgba(90, 0, 0, 0.35);
}

.mehrovafa-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Spinner */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

.mehrovafa-submit-btn.loading .btn-spinner {
    display: inline-block;
}

.mehrovafa-submit-btn.loading .btn-text {
    opacity: 0.8;
}

/* AJAX result divs */
.mehrovafa-front-result {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    display: none;
    line-height: 1.6;
    animation: slideDown 0.3s ease-out;
}

.mehrovafa-front-result.success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1.5px solid #a7f3d0;
}

.mehrovafa-front-result.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #fca5a5;
}

/* Keyframe Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

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