/* ==========================================================================
   Prayer Times Sharing Styles (استایل‌های اشتراک‌گذاری اوقات شرعی و نوار ابزار جدول)
   ========================================================================== */

/* متغیرهای طراحی مدرن (Design Tokens) */
:root {
    --oghat-primary: #0288d1;
    --oghat-primary-dark: #01579b;
    --oghat-success: #10b981;
    --oghat-success-dark: #059669;
    --oghat-danger: #ef4444;
    --oghat-danger-dark: #dc2626;
    --oghat-purple: #8b5cf6;
    --oghat-purple-dark: #6d28d9;
    --oghat-word: #2563eb;
    --oghat-word-dark: #1d4ed8;
    --oghat-bg-dark: #081627;
    --oghat-card-bg: #0f2b48;
    --oghat-border: #1e3a5f;
    --oghat-radius-sm: 8px;
    --oghat-radius-md: 14px;
    --oghat-radius-lg: 20px;
    --oghat-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
    --oghat-shadow-md: 0 6px 18px rgba(0, 0, 0, 0.14);
    --oghat-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.22);
}

/* دکمه اصلی باز کردن اشتراک‌گذاری اوقات روزانه */
.share-oghat-btn-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-share-oghat-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--oghat-primary) 0%, var(--oghat-primary-dark) 100%);
    color: #ffffff !important;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(2, 136, 209, 0.38);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-family: inherit;
}

.btn-share-oghat-main:hover {
    background: linear-gradient(135deg, #039be5 0%, #0277bd 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 136, 209, 0.48);
    color: #ffffff !important;
}

.btn-share-oghat-main:active {
    transform: translateY(0);
}

.btn-share-oghat-main i {
    font-size: 18px;
}

/* ==========================================================================
   نوار ابزار دکمه‌های جدول اوقات شرعی (Table Toolbar UI/UX)
   ========================================================================== */
.buttons-container.oghat-table-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 24px auto 16px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: var(--oghat-radius-md);
    border: 1px solid #e2e8f0;
    max-width: 780px;
    box-sizing: border-box;
}

.btnExOghat {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px !important;
    min-height: 42px;
    border-radius: var(--oghat-radius-sm) !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer;
    border: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: inherit !important;
    box-sizing: border-box;
    text-decoration: none !important;
    box-shadow: var(--oghat-shadow-sm);
    color: #ffffff !important;
}

.btnExOghat:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btnExOghat:active {
    transform: translateY(0);
}

.btnExOghat i {
    font-size: 16px;
}

/* رنگ اختصاصی هر دکمه در نوار ابزار جدول */
.btnExOghat.btn-tbl-print {
    background: linear-gradient(135deg, #0288d1, #01579b) !important;
    box-shadow: 0 3px 10px rgba(2, 136, 209, 0.3) !important;
}

.btnExOghat.btn-tbl-word {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
}

.btnExOghat.btn-tbl-pdf {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3) !important;
}

.btnExOghat.btn-tbl-share {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35) !important;
}

@media (max-width: 600px) {
    .buttons-container.oghat-table-toolbar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }
    .btnExOghat {
        width: 100%;
        padding: 9px 12px !important;
        font-size: 13px !important;
    }
}

/* ==========================================================================
   پنجره مودال اشتراک‌گذاری اوقات شرعی (Modal Overlay & Container)
   ========================================================================== */
.oghat-share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 22, 39, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 15px;
    box-sizing: border-box;
}

.oghat-share-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.oghat-share-modal {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 93vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.oghat-share-modal-overlay.active .oghat-share-modal {
    transform: scale(1) translateY(0);
}

/* هدر مودال */
.oghat-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 20px 20px 0 0;
}

.oghat-share-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: bold;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.oghat-share-header h3 i {
    color: var(--oghat-primary);
}

.oghat-share-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.oghat-share-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* سوئیچر حالت اشتراک‌گذاری: روزانه / جدول ماهانه */
.oghat-scope-switcher-wrapper {
    padding: 14px 22px 0;
}

.oghat-scope-switcher {
    display: flex;
    background: #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.oghat-scope-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: bold;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.oghat-scope-btn i {
    font-size: 15px;
}

.oghat-scope-btn.active {
    background: #ffffff;
    color: var(--oghat-primary-dark);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* تب‌های قالب اشتراک‌گذاری (Text / Image / PDF) */
.oghat-share-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    margin: 12px 22px 6px;
    border-radius: 12px;
    gap: 6px;
}

.oghat-share-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.oghat-share-tab-btn i {
    font-size: 15px;
}

.oghat-share-tab-btn.active {
    background: #ffffff;
    color: var(--oghat-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* بدنه محتوای تب‌ها */
.oghat-share-body {
    padding: 14px 22px 22px;
    overflow-y: auto;
}

.oghat-share-tab-content {
    display: none;
    animation: oghatFadeIn 0.25s ease forwards;
}

.oghat-share-tab-content.active {
    display: block;
}

@keyframes oghatFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* بخش پیش‌نمایش متن (Text Preview) */
.oghat-text-preview-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.85;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 240px;
    overflow-y: auto;
    font-family: inherit;
    margin-bottom: 16px;
    position: relative;
    user-select: text;
    direction: rtl;
}

.oghat-text-preview-box::-webkit-scrollbar {
    width: 6px;
}

.oghat-text-preview-box::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.oghat-text-preview-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

/* دکمه‌های شبکه‌های اجتماعی */
.oghat-share-grid-title {
    font-size: 14px;
    font-weight: bold;
    color: #334155;
    margin: 16px 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.oghat-share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .oghat-share-buttons-grid {
        grid-template-columns: 1fr;
    }
}

.oghat-share-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 10px;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    font-family: inherit;
    box-sizing: border-box;
}

.oghat-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    filter: brightness(1.06);
    color: #ffffff !important;
}

.oghat-share-btn:active {
    transform: translateY(0);
}

.oghat-share-btn i {
    font-size: 18px;
}

/* رنگ‌های پلتفرم‌های مختلف */
.oghat-share-btn.btn-facebook {
    background-color: #1877f2;
}

.oghat-share-btn.btn-twitter {
    background-color: #1da1f2;
}

.oghat-share-btn.btn-telegram {
    background-color: #24a1de;
}

.oghat-share-btn.btn-whatsapp {
    background-color: #25d366;
}

.oghat-share-btn.btn-linkedin {
    background-color: #0a66c2;
}

.oghat-share-btn.btn-eitaa {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.oghat-share-btn.btn-bale {
    background: linear-gradient(135deg, #009688, #00796b);
}

.oghat-share-btn.btn-copy {
    background: linear-gradient(135deg, #475569, #334155);
}

.oghat-share-btn.btn-native-share {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    grid-column: 1 / -1;
}

/* بخش پیش‌نمایش تصویر / پوستر اوقات شرعی */
.oghat-image-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.oghat-image-card-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: #0d1b2a;
    border: 1px solid #1e3a5f;
    position: relative;
}

/* پوستر اختصاصی اوقات شرعی */
.oghat-poster-card {
    background: linear-gradient(165deg, #0f2b48 0%, #081627 60%, #050d18 100%);
    color: #ffffff;
    padding: 22px 20px 18px;
    box-sizing: border-box;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.oghat-poster-card::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.oghat-poster-card::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.oghat-poster-header {
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.oghat-poster-header .besm {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.oghat-poster-header h4 {
    margin: 4px 0;
    font-size: 18px;
    font-weight: bold;
    color: #38bdf8;
    text-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.oghat-poster-header .location-sub {
    font-size: 13px;
    color: #e2e8f0;
    margin-top: 3px;
}

.oghat-poster-dates {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 14px;
    font-size: 12.5px;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.oghat-poster-times-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin-bottom: 14px;
}

.oghat-poster-time-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    transition: background 0.2s ease;
}

.oghat-poster-time-item.highlight-fajr {
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.08);
}

.oghat-poster-time-item.highlight-maghreb {
    border-color: rgba(234, 179, 8, 0.3);
    background: rgba(234, 179, 8, 0.08);
}

.oghat-poster-time-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #cbd5e1;
}

.oghat-poster-time-label img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.oghat-poster-time-val {
    font-weight: bold;
    font-size: 15px;
    color: #ffffff;
    font-family: inherit;
    direction: ltr;
}

.oghat-poster-qiblah {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(2, 136, 209, 0.12);
    border: 1px solid rgba(2, 136, 209, 0.25);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12.5px;
    color: #bae6fd;
    margin-bottom: 12px;
}

.oghat-poster-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
    font-size: 11.5px;
    color: #94a3b8;
}

.oghat-poster-footer .brand {
    font-weight: bold;
    color: #38bdf8;
    direction: ltr;
}

/* اکشن‌های تب تصویر (دانلود عکس / کپی / اشتراک) */
.oghat-image-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 6px;
}

.oghat-action-btn {
    flex: 1;
    min-width: 140px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.oghat-action-btn.btn-download-img {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.oghat-action-btn.btn-download-img:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    transform: translateY(-2px);
}

.oghat-action-btn.btn-copy-img-direct {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.oghat-action-btn.btn-copy-img-direct:hover {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    transform: translateY(-2px);
}

.oghat-action-btn.btn-share-img {
    background: linear-gradient(135deg, #0288d1, #01579b);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.3);
}

.oghat-action-btn.btn-share-img:hover {
    background: linear-gradient(135deg, #039be5, #0288d1);
    transform: translateY(-2px);
}

/* تب فایل PDF */
.oghat-pdf-content {
    text-align: center;
    padding: 10px 5px;
}

.oghat-pdf-icon-wrap {
    width: 60px;
    height: 60px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 12px;
}

.oghat-pdf-content h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #1e293b;
}

.oghat-pdf-content p {
    margin: 0 0 16px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

.oghat-pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
}

.oghat-action-btn.btn-download-pdf {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.oghat-action-btn.btn-download-pdf:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    transform: translateY(-2px);
}

.oghat-action-btn.btn-share-pdf-direct {
    background: linear-gradient(135deg, #0288d1, #01579b);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.3);
}

.oghat-action-btn.btn-share-pdf-direct:hover {
    background: linear-gradient(135deg, #039be5, #0288d1);
    transform: translateY(-2px);
}

/* پیام اعلان کپی (Toast) */
.oghat-share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: #0f172a;
    color: #ffffff;
    padding: 11px 22px;
    border-radius: 30px;
    font-size: 13.5px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 100000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    direction: rtl;
    max-width: 90vw;
    text-align: center;
}

.oghat-share-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.oghat-share-toast i {
    color: #10b981;
    font-size: 16px;
    flex-shrink: 0;
}
