﻿/*
    form-moshavere.css
    استایل کامل فرم درخواست مشاوره سایت معدنی (TEKNOTAK)
    طراحی بر اساس PDF اصلی
*/
@font-face {
    font-family: myFirstFont;
    src: url(/Font/IRANSans_Light.woff2);
}


/* کانتینر لیست Autocomplete */
.ui-autocomplete {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: myFirstFont;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px solid #6BAF8D; /* سبز تکنوتک */
    padding: 0.5rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.25s ease-in-out;
    z-index: 1051; /* بالاتر از مودال */
}

/* Input Autocomplete */
.ui-autocomplete-input {
    outline: none !important;
    box-shadow: none !important;
}

    /* هنگام فوکوس */
    .ui-autocomplete-input:focus {
        border: 2px solid #6BAF8D !important; /* سبز تکنوتک */
        box-shadow: 0 0 6px rgba(107, 175, 141, 0.5) !important; /* هاله سبز */
        outline: none !important;
    }

/* آیتم‌ها */
.ui-menu-item {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ui-menu-item-wrapper {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

    /* هاور روی آیتم‌ها */
    .ui-menu-item-wrapper:hover {
        background: #E8F5EF; /* سبز روشن تکنوتک */
        color: #6BAF8D; /* سبز اصلی تکنوتک */
    }

/* آیتم انتخاب‌شده */
.ui-state-active {
    background: #6BAF8D !important; /* سبز تکنوتک */
    color: #fff !important;
}


.main-card {
    font-family: myFirstFont !important;
    max-width: 1100px;
    margin: 30px auto;
    border-radius: 10px;
    overflow: hidden;
}

.form-header {
    background-color: #28a745;
    color: #fff;
    padding: 20px;
    text-align: center;
    position: relative;
}

.date-box {
    background: #4cbd89;
    border-radius: 6px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

    .date-box i {
        color: white;
    }

.form-header .date-box {
    position: absolute;
    left: 20px;
    top: 20px;
    background: linear-gradient(135deg, #ffffff, #f1f1f1);
    border: 1px solid rgba(0,0,0,0.1);
    color: #212529;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-header .date-box i {
    color: #0d6efd;
    font-size: 1rem;
}




    .form-header .logo {
        position: absolute;
        right: 20px;
        top: 15px;
        height: 60px;
    }

    .form-header h1 {
        margin: 0;
        font-size: 1.5rem;
        font-weight: bold;
    }

/* Toast styles */
.toast-success {
    background-color: #28a745;
    color: white;
}

.toast-error {
    background-color: #dc3545;
    color: white;
}

.toast {
    direction: rtl;
    text-align: right;
    display: flex;
    align-items: center;
}
.form-header .date-box {
    font-family: myFirstFont;
    position: absolute;
    left: 20px;
    top: 20px;
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}


/* --- تنظیمات کلی و فونت --- */
body {
    direction: rtl;
    background-color: #f6f7f8;
    margin: 0;
    padding: 0;
    color: #222;
}

/* --- کانتینر اصلی با قاب دوبل --- */
.form-container {
    max-width: 960px;
    margin: 40px auto;
    background-color: #fff;
    border: 6px double #000;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    position: relative;
}

/* --- لوگو گوشه بالا چپ --- */
.form-header .logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 120px;
    height: auto;
}

/* --- تاریخ گوشه بالا راست --- */
.form-header .date-box {
    position: absolute;
    top: 20px;
    right: 20px;
    border: 2px solid #000;
    padding: 6px 10px;
    font-size: 0.9rem;
    font-weight: bold;
    background-color: #fafafa;
}

/* --- عنوان وسط --- */
.form-header h1 {
    text-align: center;
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 40px;
    color: #333;
}

/* --- بخش‌بندی (اطلاعات مشتری، اطلاعات فنی) --- */
.section-title {
    background-color: #4caf50;
    color: #fff;
    padding: 8px 12px;
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-radius: 4px;
    display: inline-block;
}

/* --- فیلدهای ورودی --- */
.form-group {
    margin-bottom: 15px;
}

    .form-group label {
        font-weight: bold;
        display: block;
        margin-bottom: 6px;
        color: #444;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="number"],
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 8px 10px;
        border: 1px solid #ccc;
        border-radius: 3px;
        font-size: 0.95rem;
        transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    }

    .form-group textarea {
        min-height: 80px;
        resize: vertical;
    }

        /* --- فوکوس روی ورودی‌ها --- */
        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: #4caf50;
            box-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
            outline: none;
        }

/* --- چک‌باکس و رادیوباتن --- */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 6px;
}

    .form-check label {
        margin-bottom: 0;
        font-weight: normal;
    }

/* --- جدول دانه‌بندی محصول --- */
.table-grading {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

    .table-grading th,
    .table-grading td {
        border: 1px solid #ccc;
        padding: 8px;
        text-align: center;
        font-size: 0.9rem;
    }

    .table-grading th {
        background-color: #f5f5f5;
        font-weight: bold;
    }

/* --- دکمه ارسال --- */
.btn-submit {
    background-color: #4caf50;
    color: #fff;
    padding: 10px 22px;
    font-size: 1rem;
    border: none;
    border-radius: 3px;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
}

    .btn-submit:hover {
        background-color: #43a047;
    }

/* --- بخش پرسنل --- */
.staff-section {
    border-top: 2px dashed #ccc;
    margin-top: 25px;
    padding-top: 15px;
    font-size: 0.9rem;
}

/* --- Toastr RTL --- */
#toast-container > div {
    direction: rtl;
    padding: 12px 14px 12px 40px;
}

.toast-success {
    background-color: #4caf50 !important;
}
.custom-select-rtl {
    direction: rtl; /* متن راست‌چین */
    text-align: right; /* متن راست‌چین */
    appearance: none; /* مخفی کردن فلش پیش‌فرض */
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 1rem; /* فاصله سمت راست برای متن */
    background-repeat: no-repeat;
    background-position: 0.5rem center; /* فاصله از چپ 0.5rem */
    background-size: 1rem; /* اندازه فلش */
}

.toast-error {
    background-color: #f44336 !important;
}

.toast-info {
    background-color: #2196f3 !important;
}

.toast-warning {
    background-color: #ff9800 !important;
}

/* --- رسپانسیو --- */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
    }

    .form-header .logo {
        width: 90px;
    }

    .form-header .date-box {
        font-size: 0.8rem;
    }
}
