/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;500;600;700&display=swap');

/* Frontend Styles */
* {
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.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;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.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;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.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;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.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;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

/* Doctor Section Header */
.doctor-section-header {
    margin: 20px 0 12px 0;
}

.doctor-section-header h3 {
    color: rgb(43, 59, 128);
    font-size: 18px;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

/* Presentation Cards - Compact Design */
.presentation-card {
    background: white;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    border: 1px solid #eef2f6;
}

.presentation-card:hover {
    box-shadow: 0 4px 12px rgba(34, 59, 125, 0.08);
    transform: translateY(-2px);
}

/* Header Row - Doctor, Country, Presenter */
.presentation-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.doctor-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.doctor-name {
    font-size: 16px;
    font-weight: 600;
    color: rgb(43, 59, 128);
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.doctor-country {
    font-size: 13px;
    color: rgb(43, 59, 128);
    font-weight: 400;
    opacity: 0.7;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.presenter-badge {
    padding: 4px 12px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

/* Session Row */
.presentation-session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.session-label {
    font-size: 12px;
    font-weight: 600;
    color: rgb(43, 59, 128);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.session-name {
    font-size: 14px;
    font-weight: 500;
    color: rgb(43, 59, 128);
    flex: 1;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.session-type-badge {
    padding: 3px 10px;
    border-radius: 15px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

/* Talk Row */
.presentation-talk-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.talk-label {
    font-size: 12px;
    font-weight: 600;
    color: rgb(43, 59, 128);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.talk-name {
    font-size: 15px;
    font-weight: 600;
    color: rgb(43, 59, 128);
    line-height: 1.4;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

/* Hall Row */
.presentation-hall-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hall-label {
    font-size: 12px;
    font-weight: 600;
    color: rgb(43, 59, 128);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.hall-badge {
    padding: 4px 14px;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

/* DateTime Row - Beautiful animated display */
.presentation-datetime-row {
    padding-top: 14px;
    margin-top: 10px;
    border-top: 2px solid rgba(43, 59, 128, 0.1);
}

.datetime-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 25px;
    background: linear-gradient(135deg, rgba(34, 59, 125, 0.02) 0%, rgba(35, 60, 126, 0.06) 100%);
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid rgba(43, 59, 128, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.datetime-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.datetime-wrapper:hover::before {
    left: 100%;
}

.datetime-wrapper:hover {
    background: linear-gradient(135deg, rgba(34, 59, 125, 0.04) 0%, rgba(35, 60, 126, 0.08) 100%);
    border-color: rgba(43, 59, 128, 0.15);
    box-shadow: 0 4px 15px rgba(34, 59, 125, 0.1);
    transform: translateX(3px);
}

.date-display {
    font-size: 17px;
    font-weight: 600;
    color: rgb(43, 59, 128);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
    text-align: left;
    transition: all 0.3s ease;
}

.datetime-wrapper:hover .date-display {
    transform: scale(1.02);
}

.day-name {
    background: linear-gradient(135deg, rgb(43, 59, 128) 0%, rgb(63, 79, 148) 100%);
    color: white;
    padding: 5px 14px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: 'Lato', Helvetica, Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(43, 59, 128, 0.2);
    transition: all 0.3s ease;
    animation: pulseGlow 2s ease-in-out infinite;
}

.datetime-wrapper:hover .day-name {
    box-shadow: 0 4px 12px rgba(43, 59, 128, 0.3);
    transform: translateY(-1px);
}

.time-display {
    font-size: 17px;
    font-weight: 600;
    color: rgb(43, 59, 128);
    padding: 5px 18px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(34, 59, 125, 0.08);
    font-family: 'Lato', Helvetica, Arial, sans-serif;
    text-align: left;
    border: 1px solid rgba(43, 59, 128, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.time-display::after {
    content: '&#128336;';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
}

.datetime-wrapper:hover .time-display {
    box-shadow: 0 4px 15px rgba(34, 59, 125, 0.15);
    transform: translateY(-1px);
    padding-right: 35px;
    border-color: rgba(43, 59, 128, 0.2);
}

.datetime-wrapper:hover .time-display::after {
    right: 12px;
    opacity: 0.6;
}

/* Glow animation for day badge */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(43, 59, 128, 0.2);
    }
    50% {
        box-shadow: 0 4px 15px rgba(43, 59, 128, 0.4);
    }
}

/* Initial/Error/Loading states */
.psp-initial-message,
.psp-no-results,
.psp-error {
    text-align: center;
    padding: 45px 30px;
    background: #f8f9fa;
    border-radius: 12px;
    color: rgb(43, 59, 128);
    font-size: 15px;
    border: 2px dashed rgba(43, 59, 128, 0.2);
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.psp-error {
    color: #dc3545;
    background: #fff5f5;
    border-color: #dc3545;
}

.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);
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.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: rgb(43, 59, 128);
    font-family: 'Lato', Helvetica, Arial, sans-serif;
}

@keyframes psp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Select2-like styling for better UX */
.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;
}

/* Smooth transitions */
.presentation-card,
.psp-doctor-select,
.presenter-badge,
.session-type-badge,
.hall-badge,
.date-display,
.time-display {
    transition: all 0.25s ease;
}

/* ============================================ */
/*            BEAUTIFUL MOBILE STYLES           */
/* ============================================ */

@media (max-width: 768px) {
    .psp-container {
        padding: 0 12px;
    }
    
    .psp-search-wrapper {
        padding: 25px 18px;
        border-radius: 20px;
        margin-bottom: 20px;
    }
    
    .psp-search-wrapper h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .psp-search-box label {
        font-size: 13px;
        text-align: center;
    }
    
    .psp-doctor-select {
        padding: 16px 18px;
        font-size: 16px;
        border-radius: 16px;
        background-position: right 18px center;
    }
    
    .psp-search-hint {
        font-size: 12px;
        margin-top: 10px;
    }
    
    /* Doctor Section Header - Mobile */
    .doctor-section-header {
        margin: 16px 0 10px 0;
    }
    
    .doctor-section-header h3 {
        font-size: 16px;
        padding-bottom: 6px;
    }
    
    /* Presentation Cards - Mobile */
    .presentation-card {
        padding: 16px 14px;
        margin-bottom: 12px;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }
    
    .presentation-card:active {
        transform: scale(0.99);
        box-shadow: 0 2px 8px rgba(34, 59, 125, 0.1);
    }
    
    /* Header Row - Mobile */
    .presentation-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 14px;
    }
    
    .doctor-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
    }
    
    .doctor-name {
        font-size: 18px;
        font-weight: 700;
    }
    
    .doctor-country {
        font-size: 14px;
        opacity: 0.8;
    }
    
    .presenter-badge {
        align-self: flex-start;
        padding: 6px 14px;
        font-size: 12px;
        letter-spacing: 0.8px;
    }
    
    /* Session Row - Mobile */
    .presentation-session-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
        background: rgba(43, 59, 128, 0.02);
        padding: 10px 12px;
        border-radius: 12px;
        margin-left: -6px;
        margin-right: -6px;
    }
    
    .session-label {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    .session-name {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        width: 100%;
    }
    
    .session-type-badge {
        align-self: flex-start;
        padding: 4px 12px;
        font-size: 11px;
    }
    
    /* Talk Row - Mobile */
    .presentation-talk-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .talk-label {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    .talk-name {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.4;
        width: 100%;
    }
    
    /* Hall Row - Mobile */
    .presentation-hall-row {
        margin-bottom: 14px;
        gap: 12px;
    }
    
    .hall-label {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    .hall-badge {
        padding: 6px 16px;
        font-size: 14px;
        font-weight: 600;
    }
    
    /* DateTime Row - Beautiful Mobile Optimization */
    .presentation-datetime-row {
        padding-top: 16px;
        margin-top: 12px;
        border-top-width: 2px;
    }
    
    .datetime-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 18px 16px;
        border-radius: 16px;
        background: linear-gradient(135deg, rgba(34, 59, 125, 0.03) 0%, rgba(35, 60, 126, 0.08) 100%);
        border: 1.5px solid rgba(43, 59, 128, 0.1);
        box-shadow: 0 4px 12px rgba(34, 59, 125, 0.08);
    }
    
    .datetime-wrapper:active {
        background: linear-gradient(135deg, rgba(34, 59, 125, 0.06) 0%, rgba(35, 60, 126, 0.12) 100%);
        transform: scale(0.98);
        border-color: rgba(43, 59, 128, 0.2);
    }
    
    .datetime-wrapper:hover {
        transform: none;
    }
    
    .datetime-wrapper:active::before {
        left: 100%;
    }
    
    .date-display {
        font-size: 18px;
        font-weight: 700;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
        text-align: left;
        padding: 0 4px;
    }
    
    .day-name {
        padding: 6px 16px;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 1px;
        align-self: flex-start;
        box-shadow: 0 4px 12px rgba(43, 59, 128, 0.25);
        animation: pulseGlowMobile 2s ease-in-out infinite;
    }
    
    .time-display {
        font-size: 18px;
        font-weight: 700;
        padding: 12px 18px;
        text-align: center;
        width: 100%;
        border-radius: 30px;
        background: white;
        box-shadow: 0 4px 12px rgba(34, 59, 125, 0.1);
        border: 1.5px solid rgba(43, 59, 128, 0.15);
        letter-spacing: 0.5px;
    }
    
    .time-display::before {
        content: '&#9200; ';
        font-size: 18px;
        margin-right: 6px;
        opacity: 0.7;
    }
    
    .time-display::after {
        display: none;
    }
    
    .datetime-wrapper:hover .time-display {
        transform: none;
        padding-right: 18px;
    }
    
    .datetime-wrapper:hover .time-display::after {
        display: none;
    }
    
    /* Mobile Glow Animation */
    @keyframes pulseGlowMobile {
        0%, 100% {
            box-shadow: 0 4px 12px rgba(43, 59, 128, 0.25);
            transform: scale(1);
        }
        50% {
            box-shadow: 0 6px 18px rgba(43, 59, 128, 0.4);
            transform: scale(1.02);
        }
    }
    
    /* Result Count - Mobile */
    .psp-result-count {
        padding: 14px 18px;
        margin-bottom: 16px;
        border-radius: 16px;
        font-size: 15px;
        text-align: center;
        box-shadow: 0 6px 15px rgba(34, 59, 125, 0.25);
    }
    
    /* Initial/Error/Loading states - Mobile */
    .psp-initial-message,
    .psp-no-results,
    .psp-error {
        padding: 40px 20px;
        border-radius: 20px;
        font-size: 15px;
        margin: 10px 0;
    }
    
    .psp-initial-message p,
    .psp-error {
        margin: 0;
        line-height: 1.6;
    }
    
    .psp-loading {
        padding: 40px 20px;
        border-radius: 20px;
    }
    
    .psp-loading .spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
    
    /* Touch-friendly improvements */
    .psp-doctor-select,
    .presentation-card,
    .datetime-wrapper,
    .hall-badge,
    .session-type-badge,
    .presenter-badge {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Smooth scrolling for entire container */
    .psp-container {
        scroll-behavior: smooth;
    }
    
    /* Add subtle gradient to all cards on mobile */
    .presentation-card {
        background: linear-gradient(180deg, white 0%, rgba(255, 255, 255, 0.95) 100%);
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .psp-container {
        padding: 0 10px;
    }
    
    .psp-search-wrapper {
        padding: 20px 15px;
    }
    
    .psp-search-wrapper h2 {
        font-size: 20px;
    }
    
    .presentation-card {
        padding: 14px 12px;
    }
    
    .doctor-name {
        font-size: 17px;
    }
    
    .talk-name {
        font-size: 15px;
    }
    
    .datetime-wrapper {
        padding: 16px 14px;
    }
    
    .date-display {
        font-size: 17px;
    }
    
    .time-display {
        font-size: 17px;
        padding: 10px 16px;
    }
    
    .day-name {
        font-size: 13px;
        padding: 5px 14px;
    }
    
    .hall-badge {
        font-size: 13px;
        padding: 5px 14px;
    }
}

/* Landscape mode optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .presentation-card {
        max-width: 100%;
    }
    
    .datetime-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .date-display {
        flex-direction: row;
        align-items: center;
        width: auto;
    }
    
    .time-display {
        width: auto;
        text-align: center;
    }
}