/* Agreement Modal Menu Stilleri */
.agreement-modal-container {
    position: relative;
    display: inline-block;
}

.agreement-modal-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 350px;
    max-width: 450px;
    max-height: 400px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.agreement-modal-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Body */
.modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
    color: #333;
    font-size: 0.85rem;
}

/* Loading */
.modal-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.modal-spinner {
    width: 20px;
    height: 20px;
    margin: 0 auto 10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Modal Content */
.modal-content {
    padding: 0;
    margin-bottom: 15px;
}

.modal-meta {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    font-size: 0.75rem;
    color: #6b7280;
}

.modal-error {
    text-align: center;
    color: #dc2626;
    padding: 20px;
}

.modal-error h5 {
    margin: 0 0 10px 0;
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Agreement Link Stilleri */
.agreement-link {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.agreement-link:hover {
    color: #e55a2b;
    text-decoration: none;
}

.agreement-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff6b35;
}

/* Error Message */
.dropdown-error {
    background: #ffe6e6;
    color: #d63031;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #ffb3b3;
}

.dropdown-error h5 {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
}

/* Content Styling */
.dropdown-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

.dropdown-content h1,
.dropdown-content h2,
.dropdown-content h3,
.dropdown-content h4,
.dropdown-content h5,
.dropdown-content h6 {
    color: #2c3e50;
    margin: 16px 0 8px 0;
    font-weight: 600;
}

.dropdown-content h1 {
    font-size: 1.3rem;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.dropdown-content h2 {
    font-size: 1.1rem;
    color: #ff6b35;
    margin-top: 20px;
}

.dropdown-content h3 {
    font-size: 1rem;
    margin-top: 16px;
}

.dropdown-content h4 {
    font-size: 0.95rem;
    margin-top: 12px;
}

.dropdown-content p {
    margin: 8px 0 12px 0;
    text-align: justify;
    text-justify: inter-word;
}

.dropdown-content ul,
.dropdown-content ol {
    margin: 8px 0 12px 0;
    padding-left: 20px;
}

.dropdown-content li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.dropdown-content ul li {
    list-style-type: disc;
}

.dropdown-content ol li {
    list-style-type: decimal;
}

.dropdown-content strong,
.dropdown-content b {
    color: #2c3e50;
    font-weight: 600;
}

.dropdown-content em,
.dropdown-content i {
    font-style: italic;
    color: #666;
}

/* Özel paragraph stili */
.dropdown-content p:first-child {
    margin-top: 0;
}

.dropdown-content p:last-child {
    margin-bottom: 0;
}

/* Link stilleri */
.dropdown-content a {
    color: #ff6b35;
    text-decoration: none;
}

.dropdown-content a:hover {
    text-decoration: underline;
}

/* Blockquote */
.dropdown-content blockquote {
    border-left: 3px solid #ff6b35;
    margin: 12px 0;
    padding-left: 12px;
    background: #f8f9fa;
    font-style: italic;
}

/* Table stili (varsa) */
.dropdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.dropdown-content th,
.dropdown-content td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.dropdown-content th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* Responsive text */
@media (max-width: 768px) {
    .dropdown-content {
        font-size: 0.85rem;
    }
    
    .dropdown-content h1 {
        font-size: 1.1rem;
    }
    
    .dropdown-content h2 {
        font-size: 1rem;
    }
    
    .dropdown-content h3 {
        font-size: 0.95rem;
    }
}

/* Meta Info */
.dropdown-meta {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.75rem;
    color: #666;
}

.dropdown-meta p {
    margin: 2px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .agreement-modal-menu {
        min-width: 300px;
        max-width: 350px;
        max-height: 300px;
        left: -50px;
    }
    
    .modal-body {
        padding: 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .agreement-modal-menu {
        min-width: 280px;
        max-width: 320px;
        left: -80px;
    }
    
    .dropdown-header {
        padding: 10px 12px;
    }
    
    .dropdown-body {
        padding: 10px;
    }
}

/* Scrollbar Styling */
.dropdown-body::-webkit-scrollbar {
    width: 4px;
}

.dropdown-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dropdown-body::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 2px;
}

.dropdown-body::-webkit-scrollbar-thumb:hover {
    background: #e55a2b;
}

/* Arrow indicator */
.agreement-modal-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #e1e5e9;
}

.agreement-modal-menu::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}
/* ==================== GLOBAL FULLSCREEN MODAL (Desktop) ==================== */
.agreement-dropdown-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.agreement-dropdown-modal.active {
    display: flex;
}

.agreement-dropdown-modal .modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.agreement-dropdown-modal .modal-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agreement-dropdown-modal .modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.agreement-dropdown-modal .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.agreement-dropdown-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.agreement-dropdown-modal .agreement-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
    color: #333;
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agreement-dropdown-modal .agreement-content::-webkit-scrollbar {
    width: 8px;
}

.agreement-dropdown-modal .agreement-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.agreement-dropdown-modal .agreement-content::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 4px;
}

.agreement-dropdown-modal .agreement-content::-webkit-scrollbar-thumb:hover {
    background: #e55a2b;
}
