/* =============================================
   IKSA Contact Form – Professional RTL Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

.iksa-cf-wrapper {
    direction: rtl;
    font-family: 'Tajawal', Tahoma, Arial, sans-serif;
    max-width: 600px;
    margin: 40px auto;
    padding: 0 16px;
}

/* ─── Card ─── */
.iksa-cf-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,.07),
        0 10px 40px -4px rgba(0,0,0,.12);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

/* ─── Header ─── */
.iksa-cf-header {
    background: linear-gradient(135deg, #1a3c5e 0%, #2a6496 100%);
    padding: 36px 32px 28px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.iksa-cf-header::before {
    content: '';
    position: absolute;
    top: -40px; left: -40px;
    width: 180px; height: 180px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
}

.iksa-cf-header::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -30px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}

.iksa-cf-icon {
    width: 48px; height: 48px;
    color: #a8d4f5;
    margin-bottom: 12px;
}

.iksa-cf-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .3px;
}

.iksa-cf-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: .75;
}

/* ─── Form body ─── */
.iksa-cf-form {
    padding: 32px;
}

/* ─── Field ─── */
.iksa-cf-field {
    margin-bottom: 22px;
}

.iksa-cf-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.iksa-cf-label-icon {
    margin-left: 4px;
}

/* ─── Inputs ─── */
.iksa-cf-input,
.iksa-cf-textarea {
    display: block;
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a2e;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color .25s, box-shadow .25s, background .25s;
    box-sizing: border-box;
    text-align: right;
    outline: none;
    -webkit-appearance: none;
}

.iksa-cf-input:focus,
.iksa-cf-textarea:focus {
    border-color: #2a6496;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(42,100,150,.12);
}

.iksa-cf-input.iksa-error,
.iksa-cf-textarea.iksa-error {
    border-color: #e53e3e;
    background: #fff8f8;
}

.iksa-cf-textarea {
    resize: vertical;
    min-height: 120px;
}

.iksa-cf-input::placeholder,
.iksa-cf-textarea::placeholder {
    color: #a0aec0;
    font-size: 14px;
}

/* ─── Phone row ─── */
.iksa-phone-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    direction: ltr;   /* LTR so flag selector is on LEFT, number on RIGHT */
}

.iksa-phone-input {
    flex: 1;
    border-radius: 0 10px 10px 0 !important;
    border-right: none !important;
    min-width: 0;
    direction: ltr;
    text-align: left;
}

.iksa-phone-input:focus {
    position: relative;
    z-index: 1;
}

/* ─── Country selector ─── */
.iksa-country-selector {
    position: relative;
    flex-shrink: 0;
}

.iksa-country-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    height: 100%;
    min-height: 50px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a2e;
    white-space: nowrap;
    transition: background .2s, border-color .2s;
    outline: none;
}

.iksa-country-btn:hover,
.iksa-country-btn:focus {
    background: #fff;
    border-color: #2a6496;
}

.iksa-country-btn.open {
    border-color: #2a6496;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(42,100,150,.12);
    z-index: 10;
    position: relative;
}

.iksa-flag {
    font-size: 20px;
    line-height: 1;
}

.iksa-dial {
    font-size: 13px;
    font-weight: 700;
    color: #2a6496;
    min-width: 36px;
    direction: ltr;
}

.iksa-chevron {
    width: 16px; height: 16px;
    color: #888;
    transition: transform .2s;
    flex-shrink: 0;
}

.iksa-country-btn.open .iksa-chevron {
    transform: rotate(180deg);
}

/* ─── Dropdown ─── */
.iksa-country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 280px;
    background: #fff;
    border: 2px solid #2a6496;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    z-index: 9999;
    overflow: hidden;
    direction: rtl;
    animation: iksaDropdown .18s ease;
}

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

.iksa-country-search-wrap {
    padding: 10px 10px 6px;
    border-bottom: 1px solid #e8f0fe;
    background: #f8faff;
}

.iksa-country-search {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid #d0dce8;
    border-radius: 8px;
    outline: none;
    background: #fff;
    box-sizing: border-box;
    text-align: right;
    direction: rtl;
}

.iksa-country-search:focus {
    border-color: #2a6496;
}

.iksa-country-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c0d0e0 transparent;
}

.iksa-country-list::-webkit-scrollbar { width: 5px; }
.iksa-country-list::-webkit-scrollbar-thumb { background: #c0d0e0; border-radius: 3px; }

.iksa-country-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .15s;
    font-size: 13px;
}

.iksa-country-item:hover,
.iksa-country-item.selected {
    background: #eef4fb;
}

.iksa-country-item.selected {
    font-weight: 700;
    color: #1a3c5e;
}

.iksa-item-flag {
    font-size: 18px;
    flex-shrink: 0;
}

.iksa-item-name {
    flex: 1;
    color: #2c3e50;
}

.iksa-item-dial {
    color: #2a6496;
    font-weight: 700;
    font-size: 12px;
    direction: ltr;
}

/* ─── Error message ─── */
.iksa-cf-error {
    display: block;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
}

/* ─── Submit button ─── */
.iksa-cf-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #1a3c5e 0%, #2a6496 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(42,100,150,.35);
    letter-spacing: .5px;
}

.iksa-cf-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(42,100,150,.4);
}

.iksa-cf-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(42,100,150,.3);
}

.iksa-cf-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ─── Feedback ─── */
.iksa-cf-feedback {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: iksaFadeIn .35s ease;
}

.iksa-cf-feedback.iksa-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.iksa-cf-feedback.iksa-fail {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

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

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .iksa-cf-header { padding: 28px 20px 22px; }
    .iksa-cf-form   { padding: 22px 18px; }
    .iksa-cf-title  { font-size: 20px; }
    .iksa-country-dropdown { width: 260px; }
    .iksa-dial { min-width: 28px; font-size: 12px; }
}
