/**
 * TerfiGYS - Doküman Detay / İzleme Sayfası Stilleri
 */

/* Sayfa Gövdesi Kapsayıcısı */
/* Hero Header Kartı (blank_sample_page.php ile uyumlu) */
.gd-page-header {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--gd-border, #e2e8f0);
    padding: 16px 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.gd-page-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 260px;
}

.gd-page-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gd-page-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gd-page-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.gd-page-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gd-page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gd-doc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Renkli & Vurgulu Warning XS Butonları (Notlarımı İndir - Not Defteri) */
.gd-btn-xs-warning {
    background-color: #ca8a04 !important;
    color: #ffffff !important;
    border: 1px solid #ca8a04 !important;
    font-weight: 700 !important;
}

.gd-btn-xs-warning:hover {
    background-color: #a16207 !important;
    border-color: #a16207 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(202, 138, 4, 0.25) !important;
}

.gd-btn-xs-warning svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

/* Ana Viewer & Grid */
.gd-doc-viewer-grid {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.gd-view-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.gd-pdf-embed-container {
    width: 100%;
    height: 82vh;
    border-radius: 14px;
    border: 1px solid var(--gd-border, #e2e8f0);
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.gd-doc-image-wrapper {
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--gd-border, #e2e8f0);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.gd-doc-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

.gd-doc-unsupported-wrapper {
    padding: 50px 20px;
    text-align: center;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--gd-border, #e2e8f0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.gd-unsupported-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
}

/* Yan Panel Notlar - Mevzuat Akıllı Not Defteri Renk Standartları (#ca8a04, #fffbeb, #fde68a, #92400e, #451a03) */
.gd-notes-sidebar {
    width: 350px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--gd-border, #e2e8f0);
    display: flex;
    flex-direction: column;
    height: 82vh;
    position: sticky;
    top: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.gd-notes-sidebar.hidden {
    display: none !important;
}

.gd-sidebar-header {
    padding: 14px 18px;
    background: #ca8a04;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gd-sidebar-title {
    font-weight: 800;
    color: #ffffff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gd-sidebar-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.gd-sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.gd-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gd-sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gd-note-textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    resize: none;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.gd-note-textarea:focus {
    border-color: #ca8a04;
    box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.15);
}

.gd-note-item {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.gd-note-body-text {
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
    color: #451a03;
}

.gd-note-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #92400e;
    font-weight: 700;
    border-top: 1px dashed #fde68a;
    padding-top: 6px;
}

.gd-note-actions {
    display: flex;
    gap: 6px;
}

.gd-note-action-icon-btn {
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gd-note-action-icon-btn:hover {
    color: #ca8a04;
}

.gd-note-action-icon-btn.danger:hover {
    color: #dc2626;
}

.gd-note-edit-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gd-note-edit-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* Premium Kilit Paneli */
.gd-premium-lock-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 16px;
    height: 100%;
    box-sizing: border-box;
}

.gd-lock-badge {
    width: 56px;
    height: 56px;
    background: #fffbeb;
    color: #ca8a04;
    border: 1px solid #fde68a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 6px 14px rgba(202, 138, 4, 0.15);
}

.gd-lock-title {
    font-size: 16px;
    font-weight: 800;
    color: #451a03;
    margin: 0 0 8px 0;
}

.gd-lock-desc {
    font-size: 13px;
    color: #92400e;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.gd-lock-note-footer {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 14px;
}

/* Boş Durum Kartı */
.gd-empty-state-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--gd-border, #e2e8f0);
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 20px 0;
}

.gd-empty-state-card h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.gd-empty-state-card p {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    max-width: 400px;
    line-height: 1.5;
}

/* Modern Zippi Custom Responsive Modal */
.gd-notes-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.gd-notes-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gd-notes-modal {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--gd-border, #e2e8f0);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.gd-notes-modal-overlay.active .gd-notes-modal {
    transform: scale(1);
}

.gd-notes-modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gd-border, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.gd-notes-modal-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.gd-notes-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
}

.gd-notes-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.gd-notes-modal-body {
    padding: 18px;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.5;
}

.gd-notes-modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--gd-border, #e2e8f0);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 992px) {
    .gd-doc-viewer-grid {
        flex-direction: column;
        gap: 14px;
    }

    .gd-view-main {
        width: 100% !important;
    }

    .gd-notes-sidebar {
        width: 100% !important;
        height: auto;
        max-height: 500px;
        position: relative;
        top: 0;
    }

    .gd-pdf-embed-container {
        height: 70vh;
    }
}

@media (max-width: 768px) {
    .gd-page-header {
        padding: 14px;
        border-radius: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .gd-page-title {
        font-size: 1.1rem;
    }

    .gd-page-header-actions {
        width: 100%;
    }

    .gd-pdf-embed-container {
        height: 60vh;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .gd-page-body {
        padding: 6px !important;
        gap: 8px !important;
    }

    .gd-page-header-actions {
        gap: 6px;
    }

    .gd-pdf-embed-container {
        height: 55vh;
    }
}
