/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Frontend Styles */
* {
    font-family: 'Inter', sans-serif;
}

:root {
    --primary: #223b7d;
    --primary-light: rgba(34, 59, 125, 0.1);
    --primary-very-light: rgba(34, 59, 125, 0.05);
    --primary-border: rgba(34, 59, 125, 0.2);
    --foreground: #223b7d;
    --muted: #6b7280;
    --muted-light: #9ca3af;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --accent: #223b7d;
}

.psp-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

.psp-search-wrapper {
    background: linear-gradient(169deg, #223b7d 47%, #233c7e 54%);
    padding: 35px 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(34, 59, 125, 0.25);
}

.psp-search-wrapper h2 {
    color: white;
    margin: 0 0 25px 0;
    font-size: 26px;
    text-align: center;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.psp-search-box {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.psp-search-box label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.psp-doctor-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.psp-doctor-select:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.psp-doctor-select:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.psp-search-hint {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    font-style: italic;
}

/* Doctor Section Header */
.doctor-section-header {
    margin: 20px 0 12px 0;
}

.doctor-section-header h3 {
    color: var(--primary);
    font-size: 18px;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
}

/* Presentation Cards */
.presentation-card {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
    border: 1px solid var(--border);
    overflow: hidden;
}

.presentation-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Top Info Bar */
.card-top-bar {
background: #223b7d4a;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--muted);
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-item.hall-item {
    margin-left: auto;
    padding: 6px 16px;
    border-radius: 30px;
    color: white;
}

.top-bar-item.hall-item .icon-svg {
    color: white;
}

.top-bar-item.hall-item .hall-text {
    color: white;
    font-weight: 600;
}

.icon-svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.top-bar-item .icon-svg {
    color: var(--muted);
}

.date-text {
    font-weight: 500;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 6px;
}

.day-badge {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.time-text {
    color: var(--muted);
}

.hall-text {
    font-weight: 500;
    color: var(--foreground);
}

/* Card Body */
.card-body {
    padding: 24px;
    border: 1px solid #223b7d;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

/* Session Name Row */
.session-name-row {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.session-name-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.session-name-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--foreground);
}

/* Presenter Section */
.presenter-section {
    margin-bottom: 12px;
}

.presenter-pill {
    display: inline;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: white;
    border: none;
}

/* Talk Title */
.talk-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.4;
    margin: 0 0 16px 0;
}

/* Session Info Box */
.session-info-box {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.info-icon {
    width: 16px;
    height: 16px;
    color: var(--muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.session-info-content {
    flex: 1;
}

.session-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.session-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    background: #e5e7eb;
    color: #374151;
    white-space: nowrap;
}

/* Doctor Row */
.doctor-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}

.doctor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.doctor-details {
    flex: 1;
}

.doctor-fullname {
    font-weight: 600;
    color: var(--foreground);
    font-size: 15px;
    margin: 0 0 2px 0;
}

.doctor-location {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

/* Result Count */
.psp-result-count {
    background: linear-gradient(169deg, #223b7d 47%, #233c7e 54%);
    color: white;
    padding: 12px 20px;
    margin-bottom: 18px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(34, 59, 125, 0.2);
}

/* Loading State */
.psp-loading {
    text-align: center;
    padding: 45px;
    background: white;
    border-radius: 12px;
}

.psp-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #223b7d;
    border-radius: 50%;
    animation: psp-spin 1s linear infinite;
    margin-bottom: 15px;
}

.psp-loading p {
    color: var(--primary);
}

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

/* Error State */
.psp-error {
    text-align: center;
    padding: 30px 20px;
    background: #fef2f2;
    border-radius: 12px;
    color: #dc2626;
    font-size: 14px;
    border: 1px solid #fecaca;
}

/* Select2-like styling */
.psp-doctor-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23223b7d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

/* jQuery UI Autocomplete */
.ui-autocomplete {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 5px 0;
    z-index: 1000;
}

.ui-menu-item {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.ui-menu-item:last-child {
    border-bottom: none;
}

.ui-menu-item:hover,
.ui-state-focus {
    background: var(--primary);
    color: white;
    border: none;
    margin: 0;
}

/* ============================================ */
/*                 MOBILE STYLES                */
/* ============================================ */

@media (max-width: 768px) {
    .psp-container {
        padding: 0;
        max-width: 100%;
    }
    
    .psp-search-wrapper {
        padding: 20px 16px;
        border-radius: 20px;
        margin-bottom: 16px;
    }
    
    .psp-search-wrapper h2 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .psp-doctor-select {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .doctor-section-header h3 {
        font-size: 16px;
    }
    
    /* Card Mobile */
    .presentation-card {
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    /* Top Bar Mobile */
    .card-top-bar {
        padding: 10px 16px;
        gap: 8px 12px;
    }
    
    .top-bar-item.hall-item {
        margin-left: 0;
        padding: 4px 12px;
    }
    
    .date-text,
    .time-text,
    .hall-text {
        font-size: 12px;
    }
    
    .day-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .icon-svg {
        width: 14px;
        height: 14px;
    }
    
    /* Card Body Mobile */
    .card-body {
        padding: 16px;
    }
    
    .session-name-row {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .session-name-label {
        font-size: 11px;
    }
    
    .session-name-value {
        font-size: 13px;
    }
    
    .presenter-pill {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .talk-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    /* Session Info Box Mobile */
    .session-info-box {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .session-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    /* Doctor Row Mobile */
    .doctor-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .doctor-fullname {
        font-size: 14px;
    }
    
    .doctor-location {
        font-size: 12px;
    }
    
    .psp-result-count {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .card-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .talk-title {
        font-size: 16px;
    }
    
    .session-info-box {
        flex-direction: column;
        gap: 8px;
    }
    
    .session-badges {
        flex-direction: column;
        gap: 4px;
    }
    
    .session-badge {
        width: fit-content;
    }
}

/* Talk Name Row */
.talk-name-row {
    margin-bottom: 6px;
}

.talk-name-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Talk Title */
.talk-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.4;
    margin: 0 0 16px 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .talk-name-label {
        font-size: 11px;
    }
    
    .talk-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .talk-title {
        font-size: 16px;
    }
}