/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Tailwind Configuration for Dashboard */
@layer base {
    :root {
        --color-darkblue: #1A202C;
        --color-mediumblue: #2D3748;
        --color-lightblue: #4A5568;
        --color-accentteal: #38B2AC;
        --color-accentorange: #ED8936;
        --color-textlight: #E2E8F0;
        --color-textdark: #A0AEC0;
        --color-warningyellow: #F6E05E;
    }
}

@font-face {
    font-family: 'IRANSans-web';
    src: url('../fonts/IRANSans-Bold-web.eot');
    src: url('../fonts/IRANSans-Bold-web.eot?#iefix') format('eot'),  /* IE6–8 */
    url('../fonts/IRANSans-Bold-web.woff2') format('woff2'),  /* Chrome36+, Opera24+*/
    url('../fonts/IRANSans-Bold-web.woff') format('woff'),  /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../fonts/IRANSans-Bold-web.ttf') format('truetype');
    font-weight: bold;
}
@font-face {
    font-family: 'IRANSans-web';
    src: url('../fonts/IRANSans-Medium-web.eot');
    src: url('../fonts/IRANSans-Medium-web.eot?#iefix') format('eot'),
    url('../fonts/IRANSans-Medium-web.woff2') format('woff2'),
    url('../fonts/IRANSans-Medium-web.woff') format('woff'),
    url('../fonts/IRANSans-Medium-web.ttf') format('truetype');
    font-weight: 500;
}
@font-face {
    font-family: 'IRANSans-web';
    src: url('../fonts/IRANSans-Light-web.eot');
    src: url('../fonts/IRANSans-Light-web.eot?#iefix') format('eot'),
    url('../fonts/IRANSans-Light-web.woff2') format('woff2'),
    url('../fonts/IRANSans-Light-web.woff') format('woff'),
    url('../fonts/IRANSans-Light-web.ttf') format('truetype');
    font-weight: 300;
}
@font-face {
    font-family: 'IRANSans-web';
    src: url('../fonts/IRANSans-UltraLight-web.eot');
    src: url('../fonts/IRANSans-UltraLight-web.eot?#iefix') format('eot'),
    url('../fonts/IRANSans-UltraLight-web.woff2') format('woff2'),
    url('../fonts/IRANSans-UltraLight-web.woff') format('woff'),
    url('../fonts/IRANSans-UltraLight-web.ttf') format('truetype');
    font-weight: 200;
}
@font-face {
    font-family: 'IRANSans-web';
    src: url('../fonts/IRANSans-web.eot');
    src: url('../fonts/IRANSans-web.eot?#iefix') format('eot'),
    url('../fonts/IRANSans-web.woff2') format('woff2'),
    url('../fonts/IRANSans-web.woff') format('woff'),
    url('../fonts/IRANSans-web.ttf') format('truetype');
    font-weight: normal;
}

body {
    font-family: 'IRANSans-web', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
}

/* اطمینان از استفاده از فونت ایران سنس در تمام عناصر */
* {
    font-family: 'IRANSans-web', sans-serif;
}

/* استثنا برای کدها که باید از فونت monospace استفاده کنند */
pre, code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
}

/* اطمینان از استفاده از فونت ایران سنس در عناصر select و option */
select, option {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در کلاس form-select */
.form-select {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در کلاس form-input */
.form-input {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در کلاس form-textarea */
.form-textarea {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در کلاس action-button */
.action-button {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در کلاس form-label */
.form-label {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در کلاس‌های متنی مهم */
.applied-template-message,
.loading-message,
.loading-hint {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در عناوین */
h1, h2, h3, h4, h5, h6 {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در کلاس‌های span مهم */
.help-icon,
.tooltip,
.info-icon,
.version-info {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در کلاس‌های div مهم */
.form-label-container,
.modal-title,
.help-panel-title,
.rewrite-selected-text-display {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در عناصر لیست */
ul, ol, li {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در عناصر تاکیدی */
strong, em, b, i {
    font-family: 'IRANSans-web', sans-serif !important;
}

/* اطمینان از استفاده از فونت ایران سنس در عناصر ساختاری */
footer, form {
    font-family: 'IRANSans-web', sans-serif !important;
}
.main-app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 1rem;
}
.content-layout {
    flex-grow: 1;
    display: flex;
    gap: 1.5rem;
    min-height: 0;
}
#formBriefContainer, #outputWrapper {
    background-color: #1e293b;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#formBriefContainer {
    padding: 0;
}
#geminiBriefForm {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}
#outputWrapper {
    /* No explicit max-height */
}
#outputContainer {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.form-section-collapsible {
    margin-bottom: 1.25rem;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
}
.form-section-header {
    background-color: #334155;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #475569;
}
.form-section-header h2 {
    font-size: 1.05rem;
    font-weight: bold;
    color: #e2e8f0;
    margin: 0;
}
.form-section-content {
    padding: 1.25rem;
    background-color: #1e293b;
    max-height: 1500px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-out;
}
.form-section-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    border-top-width: 0;
}
.form-section-toggle-icon {
    transition: transform 0.3s ease;
    color: #94a3b8;
    width: 1.125rem;
    height: 1.125rem;
}
.form-section-header.collapsed .form-section-toggle-icon {
    transform: rotate(-90deg);
}

.form-label-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}
.form-label {
    font-weight: 500;
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 0;
}
.help-icon {
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.75rem;
    border: 1px solid #adb5bd;
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    position: relative;
    order: -1;
}
.help-icon:hover {
    background-color: #475569;
    color: #06b6d4;
}
.tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none;
    border: 1px solid #475569;
}
.help-icon:hover > .tooltip {
    visibility: visible;
    opacity: 1;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #475569;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: #334155;
    font-size: 0.95rem;
    color: #e2e8f0;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
    background-color: #475569;
}
.form-select:disabled {
    background-color: #475569;
    cursor: not-allowed;
}
.form-textarea {
    min-height: 90px;
}
.action-button {
    color: white;
    font-weight: 500;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin: 0 0.25rem;
    border: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
.action-button:active {
    transform: translateY(0px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.action-button:disabled {
    background-color: #ced4da !important;
    color: #6c757d !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: translateY(0px);
}
.submit-button-area {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #475569;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.submit-button {
    background-color: #06b6d4;
}
.submit-button:hover {
    background-color: #0891b2;
}
.settings-button {
    background-color: #475569;
}
.settings-button:hover {
    background-color: #64748b;
}
.copy-button {
    background-color: #10b981;
}
.copy-button:hover {
    background-color: #059669;
}
.link-button {
    background-color: #06b6d4;
}
.link-button:hover {
    background-color: #0891b2;
}
.regenerate-button {
    background-color: #f59e0b;
    color: #ffffff;
}
.regenerate-button:hover {
    background-color: #d97706;
}
.nav-button {
    background-color: #475569;
}
.nav-button:hover {
    background-color: #64748b;
}
.analyze-button {
    background-color: #06b6d4; /* Teal */
}
.analyze-button:hover {
    background-color: #0891b2;
}
.discover-suggestions-button {
    background-color: #06b6d4; /* Teal */
}
.discover-suggestions-button:hover {
    background-color: #0891b2;
}
.seo-button {
    background-color: #06b6d4; /* Teal */
}
.seo-button:hover {
    background-color: #0891b2;
}
.applied-template-message {
    font-size: 0.875rem;
    color: #ecfdf5;
    background-color: #065f46;
    border: 1px solid #047857;
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.75rem;
}
#articleOutput {
    transition: opacity 0.3s ease-in-out;
    font-size: 0.95rem;
    line-height: 1.7;
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
    text-align: justify;
}
#articleOutput.fading-out {
    opacity: 0;
}
#articleOutput.fading-in {
    opacity: 1;
}
#articleOutput h1, #articleOutput h2, #articleOutput h3, #articleOutput h4 {
    font-weight: bold;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    color: #e2e8f0;
    line-height: 1.3;
}
#articleOutput h1 { font-size: 1.6rem; }
#articleOutput h2 { font-size: 1.4rem; }
#articleOutput h3 { font-size: 1.2rem; }
#articleOutput h4 { font-size: 1.05rem; }
#articleOutput p {
    margin-bottom: 1em;
    color: #cbd5e1;
}
#articleOutput ul, #articleOutput ol {
    margin-bottom: 1em;
    margin-right: 1.75em;
    padding-right: 0.5em;
    list-style-position: outside;
}
#articleOutput ul { list-style-type: disc; }
#articleOutput ol { list-style-type: decimal; }
#articleOutput li {
    margin-bottom: 0.5em;
    color: #fff;
}
#articleOutput strong, #articleOutput b { font-weight: 500; }
#articleOutput em, #articleOutput i { font-style: italic; }
#articleOutput a {
    color: #06b6d4;
    text-decoration: none;
    font-weight: 500;
}
#articleOutput a:hover { color: #0891b2; text-decoration: underline; }
#articleOutput pre {
    background-color: #334155;
    padding: 0.8em 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.85rem;
    border: 1px solid #475569;
}
#articleOutput code:not(pre code) {
    background-color: #475569;
    padding: 0.15em 0.3em;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.85em;
    color: #f472b6;
}
/* Improved Table Styles */
#articleOutput table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 0.9rem;
}
#articleOutput th, #articleOutput td {
    border: 1px solid #475569;
    padding: 0.75rem;
    text-align: right;
}
#articleOutput thead th {
    background-color: #334155;
    font-weight: bold;
    color: #e2e8f0;
}
#articleOutput tbody tr:nth-child(odd) {
    background-color: #1e293b;
}

#formMessagesContainer {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 1050;
    max-width: 320px;
}
.message-display {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: opacity 0.5s ease;
}
.message-display.success {
    background-color: #065f46;
    color: #ecfdf5;
    border: 1px solid #047857;
}
.message-display.error {
    background-color: #7f1d1d;
    color: #fef2f2;
    border: 1px solid #991b1b;
}
.output-actions-container {
    padding: 0.75rem;
    background-color: #334155;
    border-bottom: 1px solid #475569;
    margin-bottom: 1rem;
    border-radius: 12px 12px 0 0;
}
.output-actions-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.output-actions-group-left {
    display: flex;
    gap: 0.5rem;
    order: 1;
}
.output-actions-group-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: auto;
    order: 2;
}
.output-actions-group-right {
    display: flex;
    gap: 0.5rem;
    order: 3;
}

.version-info {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: auto 0.5rem;
    display: inline-flex;
    align-items: center;
}
/* Loading Modal Styles */
#globalLoadingModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
#globalLoadingModal.active {
    opacity: 1;
    visibility: visible;
}
.loading-content-box {
    background-color: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 350px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #475569;
    border-top: 4px solid #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-message {
    font-size: 1rem;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}
.loading-hint {
    font-size: 0.9rem;
    color: #94a3b8;
    min-height: 2.5em;
}
/* Modals Styles (Settings, Link, Rewrite) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: #1e293b;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 600px;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.modal-title {
    font-size: 1.35rem;
    font-weight: bold;
    color: #e2e8f0;
}
.modal-close-button {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #94a3b8;
    padding: 0.25rem;
    line-height: 1;
}
.modal-close-button:hover {
    color: #cbd5e1;
}
.modal-body {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 0.5rem;
}
.modal-body .form-label {
    margin-top: 1rem;
}
.modal-body .form-label:first-child {
    margin-top: 0;
}
.modal-actions {
    margin-top: 2rem;
    text-align: left;
    padding-top: 1rem;
    border-top: 1px solid #475569;
}
.link-entry-group, .rewrite-selected-text-display {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}
.link-entry-group input {
    flex-grow: 1;
}
.remove-link-button {
    background-color: #dc3545;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}
.remove-link-button:hover {
    background-color: #c82333;
}
.rewrite-selected-text-display {
    background-color: #334155;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #475569;
    font-style: italic;
    color: #cbd5e1;
    max-height: 100px;
    overflow-y: auto;
}
/* Custom Context Menu */
#customContextMenu {
    position: absolute;
    background-color: #1e293b;
    border: 1px solid #475569;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 1001;
    min-width: 220px;
}
#customContextMenu button {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    text-align: right;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #e2e8f0;
}
#customContextMenu button:hover {
    background-color: #334155;
}
/* Help Panel Styles */
#helpPanel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: #1e293b;
    box-shadow: 2px 0 15px rgba(0,0,0,0.3);
    z-index: 1050;
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid #475569;
}
#helpPanel.active {
    left: 0;
}
.help-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #475569;
}
.help-panel-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #e2e8f0;
}
.help-panel-close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}
.help-panel-body {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}
#helpPanelTabs {
    width: 200px;
    min-width: 200px;
    border-left: 1px solid #475569;
    overflow-y: auto;
    padding: 1rem 0;
    background-color: #334155;
}
#helpPanelTabs button {
    display: block;
    width: 100%;
    padding: 0.85rem 1.25rem;
    text-align: right;
    background: none;
    border: none;
    border-bottom: 1px solid #475569;
    cursor: pointer;
    font-size: 0.95rem;
    color: #cbd5e1;
    white-space: normal;
    line-height: 1.4;
}
#helpPanelTabs button:last-child {
    border-bottom: none;
}
#helpPanelTabs button.active, #helpPanelTabs button:hover {
    background-color: #475569;
    color: #06b6d4;
    font-weight: 500;
}
#helpPanelContent {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
}
#helpPanelContent h4 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #06b6d4;
    margin-bottom: 0.75rem;
}
#helpPanelContent p, #helpPanelContent ul, #helpPanelContent ol {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-size: 0.9rem;
    color: #cbd5e1;
}
#helpPanelContent ul, #helpPanelContent ol {
    margin-right: 1rem;
}
#helpPanelContent li {
    margin-bottom: 0.3rem;
}
.app-footer {
    margin-top: auto; /* Pushes footer to the bottom */
    padding: 1rem 1.5rem 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    border-top: 1px solid #475569;
}
.app-footer a {
    color: #06b6d4;
    text-decoration: none;
    font-weight: bold;
}
.app-footer a:hover {
    text-decoration: underline;
}
#imageSearchResults {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}
#imageSearchResults img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
#imageSearchResults img:hover {
    border-color: #06b6d4;
} 

/* استایل‌های مربوط به بخش تحلیل */
.input-group {
    margin-bottom: 1rem;
}

.input-group .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #cbd5e1;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #06b6d4;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

.chart-container {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #334155;
    border-radius: 8px;
    border: 1px solid #475569;
}

/* Dashboard-specific styles */
/* Custom scrollbar for better aesthetics */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #2D3748;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #4A5568;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5A6578;
}

/* Active tab styling */
.tab-active {
    border-bottom-color: #38B2AC; /* accentteal */
    color: #E2E8F0; /* textlight */
}

/* Ensure canvas is responsive within its container */
canvas {
    max-width: 100%;
    height: auto;
}

/* Sorting icons */
.sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 5px;
    vertical-align: middle;
}
.sort-asc {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #E2E8F0; /* textlight */
}
.sort-desc {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #E2E8F0; /* textlight */
}

/* Styling for the copy message box */
#copy-message-box {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #38B2AC; /* accentteal */
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    font-family: 'IRANSans-web', sans-serif;
}
#copy-message-box.show {
    opacity: 1;
}

/* Style for the info popup */
.info-popup {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: #2D3748; /* mediumblue */
    color: #E2E8F0; /* textlight */
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 50;
}
.info-popup::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 1.5rem;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #2D3748 transparent; /* mediumblue */
}
 /* Custom scrollbar for better aesthetics */
 ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #2D3748;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #4A5568;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5A6578;
}
/* Active tab styling */
.tab-active {
    border-bottom-color: #38B2AC; /* accentteal */
    color: #E2E8F0; /* textlight */
}

/* Responsive Design for Mobile and Tablet */
@media (max-width: 768px) {
    /* Mobile Navigation */
    .mobile-nav-toggle {
        display: block;
    }
    
    .sidebar-mobile {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background-color: #2D3748;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .sidebar-mobile.active {
        left: 0;
    }
    
    /* Mobile Content Adjustments */
    .main-content-mobile {
        margin-left: 0;
        width: 100%;
    }
    
    /* Mobile Form Adjustments */
    .form-input, .form-textarea, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Mobile Button Adjustments */
    .action-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Mobile Chart Adjustments */
    canvas {
        max-height: 250px;
    }
    
    /* Mobile Table Adjustments */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile Modal Adjustments */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 1rem;
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar-tablet {
        width: 240px;
    }
    
    .main-content-tablet {
        margin-left: 240px;
    }
    
    /* Tablet Chart Adjustments */
    canvas {
        max-height: 300px;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1025px) {
    .sidebar-desktop {
        width: 256px;
    }
    
    .main-content-desktop {
        margin-left: 256px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .action-button {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    /* Better touch scrolling */
    .scrollable-content {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Disable hover effects on touch devices */
    .hover-effect {
        transition: none;
    }
    
    .hover-effect:hover {
        transform: none;
    }
}