/* =============================================================================
   style-inputs.css — فیلد مبلغ، تقویم شمسی و انتخاب فایل
   ========================================================================== */

/* --- انتخاب فایل مطابق الگوی ChooseFile.html --- */
.file-upload-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 20px 25px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
}

.file-upload-container .file-input-hidden {
    display: none;
}

.file-upload-container .custom-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4e90bd 0%, #12a19a 100%);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
    transition: transform .2s, box-shadow .2s, opacity .2s;
    user-select: none;
}

.file-upload-container .custom-file-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, .18);
}

.file-upload-container .custom-file-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
}

.file-upload-container .custom-file-btn:focus-visible {
    outline: 3px solid rgba(18, 161, 154, .28);
    outline-offset: 2px;
}

.file-upload-container .custom-file-btn:disabled {
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

.file-upload-container .file-name-box {
    min-width: 200px;
    flex: 1 1 auto;
    overflow: hidden;
    padding: 10px 15px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: #f9f9f9;
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s, border-color .2s, background .2s;
}

.file-upload-container .file-name-box.has-file {
    border-style: solid;
    border-color: #2575fc;
    background: #f0f6ff;
    color: #333;
}

@media (max-width: 600px) {
    .file-upload-container {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .file-upload-container .custom-file-btn,
    .file-upload-container .file-name-box {
        width: 100%;
    }
}

/* --- فیلد مبلغ --- */
input[data-money] {
    text-align: right;
    letter-spacing: .3px;
    font-variant-numeric: tabular-nums;
}

/* --- انتخابگر تاریخ شمسی --- */
.jd-wrap { position: relative; }

.jd-input { cursor: pointer; background-image: none; }

/* پنل fixed است تا داخل مودال‌هایی که overflow دارند بریده نشود و باعث
   اسکرول شدن آن‌ها نگردد؛ مختصاتش را جاوااسکریپت از روی فیلد حساب می‌کند. */
.jd-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 260px;
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    padding: 10px;
    font-family: inherit;
}
.jd-panel.open { display: block; }

.jd-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.jd-title { font-size: 13px; font-weight: 700; }
.jd-nav {
    width: 28px; height: 28px; border: none; border-radius: 8px;
    background: #f1f3f5; color: #444; cursor: pointer; font-size: 11px;
}
.jd-nav:hover { background: #e4e7ea; }

.jd-week {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 2px; margin-bottom: 4px;
}
.jd-week span {
    text-align: center; font-size: 10.5px; color: #8a949c; padding: 4px 0;
}

.jd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

.jd-cell {
    height: 30px; border: none; border-radius: 8px;
    background: transparent; cursor: pointer;
    font-family: inherit; font-size: 12px; color: #2d3436;
}
.jd-cell:hover { background: #f1f3f5; }
.jd-cell.empty { visibility: hidden; cursor: default; }
.jd-cell.today { border: 1.5px solid #ef3a4b; color: #ef3a4b; font-weight: 700; }
.jd-cell.picked { background: #ef3a4b; color: #fff; font-weight: 700; }

.jd-time {
    display: flex; align-items: center; gap: 6px;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e6e9ec;
}
.jd-time label { font-size: 12px; color: #61757d; margin-inline-end: auto; }
.jd-time input {
    width: 54px; padding: 6px; text-align: center;
    border: 1px solid #e3e6ea; border-radius: 8px;
    font-family: inherit; font-size: 12.5px;
}
.jd-time b { color: #8a949c; }

.jd-foot { display: flex; gap: 6px; margin-top: 10px; }
.jd-btn {
    flex: 1; border: none; border-radius: 9px; padding: 8px;
    background: #ef3a4b; color: #fff; cursor: pointer;
    font-family: inherit; font-size: 12px; font-weight: 600;
}
.jd-btn.ghost { background: #f1f3f5; color: #2d3436; }
.jd-btn.ghost:hover { background: #e4e7ea; }

/* در پنل فروشنده و مدیریت، رنگ اصلی متفاوت است */
.sel-shell .jd-cell.today,
.adm-shell .jd-cell.today { border-color: var(--sel-primary, #ef3a4b); color: var(--sel-primary, #ef3a4b); }
.sel-shell .jd-cell.picked,
.adm-shell .jd-cell.picked,
.sel-shell .jd-btn,
.adm-shell .jd-btn { background: var(--sel-primary, #ef3a4b); }
