/**
 * Şura Bilgi Bankası - Styles
 * 
 * @package Sura_Bilgi_Bankasi
 */

/* ==========================================================================
   SEARCH SECTION STYLES
   ========================================================================== */

/* Global Font */
body,
input,
select,
button,
p,
span {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sura-bb-section {
    padding: 7rem 0;
    background: rgb(254, 242, 242); /* Toz pembe */
    position: relative;
    overflow: hidden;
}

/* Background Pattern */
.sura-bb-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.05;
}

.sura-bb-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #00464F; /* brand-800 */
    border-radius: 50%;
}

.sura-bb-circle-1 {
    width: 800px;
    height: 800px;
}

.sura-bb-circle-2 {
    width: 600px;
    height: 600px;
}

/* Container */
.sura-bb-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

/* Main Card */
.sura-bb-card {
    max-width: 1024px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 2.5rem;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(43, 46, 49, 0.05); /* brand-900/5 */
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
}

@media (max-width: 768px) {
    .sura-bb-card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }
}

/* Header */
.sura-bb-header {
    text-align: center;
    margin-bottom: 3rem;
}

.sura-bb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 1.5rem;
    background: rgb(254, 242, 242); /* Toz pembe */
    color: rgb(217, 32, 39); /* Ara butonu kırmızısı */
    margin-bottom: 1.5rem;
}

.sura-bb-icon svg {
    width: 32px;
    height: 32px;
}

.sura-bb-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2.5rem;
    line-height: 1.2;
    color: #2b2e31; /* brand-900 */
    margin: 0 0 1rem 0;
    font-weight: 700;
}

@media (min-width: 1024px) {
    .sura-bb-title {
        font-size: 3rem;
    }
}

.sura-bb-subtitle {
    font-size: 1.25rem;
    color: #6b7280; /* gray-500 */
    margin: 0;
    font-family: 'Gotham', sans-serif;
}

/* Search Form */
.sura-bb-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .sura-bb-form {
        flex-direction: row;
    }
}

/* Search Input Group */
.sura-bb-input-group {
    flex: 1;
    position: relative;
}

.sura-bb-input-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 24px;
    height: 24px;
    transition: color 0.3s ease;
    pointer-events: none;
}

.sura-bb-input-group:focus-within .sura-bb-input-icon {
    color: rgb(217, 32, 39); /* Ara butonu kırmızısı */
}

.sura-bb-section .sura-bb-input,
.sura-bb-card .sura-bb-input,
input.sura-bb-input {
    width: 100% !important;
    padding: 1.25rem 1.5rem 1.25rem 4rem !important; /* py-5 pr-6 pl-16 */
    border-radius: 1rem !important; /* rounded-2xl */
    background: #F9F8F6 !important; /* cream-50 */
    border: 1px solid transparent !important;
    outline: none !important;
    transition: all 0.3s ease !important; /* duration-300 */
    color: #2b2e31 !important; /* brand-900 */
    font-size: 1.125rem !important; /* text-lg */
    line-height: 1.75rem !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 400 !important;
    box-sizing: border-box !important;
}

.sura-bb-section .sura-bb-input::placeholder,
.sura-bb-card .sura-bb-input::placeholder,
input.sura-bb-input::placeholder {
    color: #9ca3af !important; /* gray-400 */
}

.sura-bb-section .sura-bb-input:focus,
.sura-bb-card .sura-bb-input:focus,
input.sura-bb-input:focus {
    background: #ffffff !important;
    border-color: rgba(217, 32, 39, 0.3) !important; /* brand-300 tonu */
    box-shadow: 0 0 20px rgba(217, 32, 39, 0.2) !important; /* shadow-glow kırmızı */
}

/* Select Group */
.sura-bb-select-group {
    width: 100%;
    position: relative;
}

@media (min-width: 768px) {
    .sura-bb-select-group {
        width: 256px;
    }
}

.sura-bb-select {
    width: 100%;
    padding: 1.25rem 2.5rem 1.25rem 3.5rem;
    border-radius: 1rem;
    background: #F9F8F6; /* cream-50 */
    border: 1px solid transparent;
    outline: none;
    transition: all 0.3s ease;
    color: #4b5563; /* gray-600 */
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    font-family: 'Gotham', sans-serif;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.sura-bb-select:focus {
    background-color: #ffffff;
    border-color: rgba(217, 32, 39, 0.3);
    box-shadow: 0 0 20px rgba(217, 32, 39, 0.2); /* shadow-glow kırmızı */
}

/* Search Button */
.sura-bb-section .sura-bb-form .sura-bb-button,
button.sura-bb-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.875rem 1rem !important;
    background: rgb(217, 32, 39) !important; /* Ara butonu kırmızısı */
    color: #ffffff !important;
    border-radius: 1rem !important; /* rounded-2xl - tasarımda dikdörtgen */
    font-weight: 700 !important;
    font-size: 1.125rem !important; /* text-lg */
    line-height: 1.5 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 15px -3px rgba(217, 32, 39, 0.3), 0 4px 6px -2px rgba(217, 32, 39, 0.05) !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    width: 140px !important;
    min-width: 140px !important;
    height: auto !important;
    position: relative !important;
    z-index: 10 !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.sura-bb-section .sura-bb-form .sura-bb-button:hover,
button.sura-bb-button:hover {
    background: rgb(185, 28, 28) !important; /* Hover koyu kırmızı */
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 20px 25px -5px rgba(217, 32, 39, 0.35), 0 10px 10px -5px rgba(217, 32, 39, 0.1) !important;
}

.sura-bb-section .sura-bb-form .sura-bb-button:active,
button.sura-bb-button:active {
    transform: translateY(0) !important;
}

.sura-bb-section .sura-bb-form .sura-bb-button:disabled,
button.sura-bb-button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Popular Searches */
.sura-bb-section .sura-bb-popular,
.sura-bb-card .sura-bb-popular {
    margin-top: 2rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    font-size: 1rem !important;
    color: #64748b !important;
}

.sura-bb-section .sura-bb-popular-label,
.sura-bb-card .sura-bb-popular-label {
    font-weight: 500 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: #64748b !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.sura-bb-section .sura-bb-popular-tag,
.sura-bb-card .sura-bb-popular-tag,
button.sura-bb-popular-tag,
span.sura-bb-popular-tag {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.375rem 1rem !important;
    border-radius: 9999px !important;
    background: rgb(254, 242, 242) !important; /* Toz pembe */
    color: rgb(185, 28, 28) !important; /* Koyu kırmızı */
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    white-space: nowrap !important;
    height: auto !important;
    min-height: auto !important;
    box-shadow: none !important;
}

.sura-bb-section .sura-bb-popular-tag:hover,
.sura-bb-card .sura-bb-popular-tag:hover,
button.sura-bb-popular-tag:hover,
span.sura-bb-popular-tag:hover {
    background: rgb(254, 226, 226) !important; /* Hover toz pembe */
    color: rgb(185, 28, 28) !important;
    border-color: rgba(185, 28, 28, 0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

/* ==========================================================================
   MODAL STYLES
   ========================================================================== */

.sura-bb-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem;
}

.sura-bb-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.sura-bb-modal {
    background: #ffffff;
    border-radius: 1.5rem;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

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

/* Modal Header */
.sura-bb-modal-header {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(255, 247, 237, 0.5), transparent);
}

.sura-bb-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sura-bb-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem; /* rounded-lg - ara butonu gibi */
    background: rgb(217, 32, 39); /* Ara butonu kırmızısı */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(217, 32, 39, 0.2);
}

.sura-bb-modal-close:hover {
    background: rgb(185, 28, 28); /* Hover koyu kırmızı */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(217, 32, 39, 0.3);
}

/* Modal Body */
.sura-bb-modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(85vh - 140px);
}

/* Loading State */
.sura-bb-loading {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.sura-bb-spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: rgb(217, 32, 39);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results */
.sura-bb-results {
    display: grid;
    gap: 1.5rem;
}

.sura-bb-result-item {
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sura-bb-result-item:hover {
    border-color: rgb(217, 32, 39);
    box-shadow: 0 4px 12px rgba(217, 32, 39, 0.1);
    transform: translateY(-2px);
}

.sura-bb-result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.sura-bb-result-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.sura-bb-result-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgb(254, 242, 242);
    color: rgb(185, 28, 28);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sura-bb-result-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.sura-bb-result-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sura-bb-result-summary {
    color: #475569;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.sura-bb-result-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgb(217, 32, 39);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.sura-bb-result-link:hover {
    gap: 0.75rem;
}

/* No Results */
.sura-bb-no-results {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.sura-bb-no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.sura-bb-no-results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.sura-bb-no-results-text {
    margin: 0;
}

/* Error State */
.sura-bb-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: #b91c1c;
}

/* Responsive */
@media (max-width: 768px) {
    .sura-bb-modal {
        margin: 1rem;
        max-height: 90vh;
    }
    
    .sura-bb-modal-header,
    .sura-bb-modal-body {
        padding: 1.5rem;
    }
    
    .sura-bb-result-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}
