/* ============================================
   PSP Patient Portal - Main Stylesheet
   Mobile-First Responsive Design
   ============================================ */

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

/* CSS Variables for consistent theming */
:root {
    --psp-primary: #0D7377;
    --psp-primary-dark: #095456;
    --psp-primary-light: #14A3A8;
    --psp-secondary: #1E5F8A;
    --psp-secondary-dark: #14405D;
    --psp-white: #ffffff;
    --psp-light-bg: #F8F9FA;
    --psp-text-dark: #1A1A2E;
    --psp-text-muted: #6B7280;
    --psp-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --psp-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --psp-border-radius: 20px;
    --psp-transition: all 0.3s ease;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   BUTTON LOADING STATE
   ============================================ */

.psp-btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.psp-btn-loading .psp-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: psp-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* ============================================
   START SCREEN STYLES
   ============================================ */

.psp-start-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #1a3a4a;
}

/* Background Image */
.psp-start-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.psp-start-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 50, 60, 0.3) 0%,
        rgba(0, 40, 50, 0.5) 50%,
        rgba(0, 30, 40, 0.7) 100%
    );
}

/* Content Container */
.psp-start-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-top: env(safe-area-inset-top, 20px);
}

/* Logo */
.psp-logo {
    text-align: center;
    padding-top: 20px;
}

.psp-logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* Main Content */
.psp-start-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 20px;
}

/* Title */
.psp-start-title {
    color: var(--psp-white);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

/* Subtitle */
.psp-start-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 0;
}

.psp-start-subtitle strong {
    color: var(--psp-white);
    font-weight: 600;
}

/* Bottom Section */
.psp-start-bottom {
    position: relative;
    z-index: 1;
    padding: 24px 20px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 0 0;
    margin-top: -24px;
}

/* Start Button */
.psp-btn-start {
    display: block;
    width: 100%;
    padding: 18px 24px;
    background: var(--psp-white);
    border: 2px solid #E5E7EB;
    border-radius: 50px;
    color: var(--psp-text-dark);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--psp-transition);
}

.psp-btn-start:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.psp-btn-start:active {
    transform: scale(0.98);
}

/* Bottom Indicator */
.psp-bottom-indicator {
    width: 134px;
    height: 5px;
    background: var(--psp-text-dark);
    border-radius: 100px;
    margin: 20px auto 0;
}

/* ============================================
   OPTIONS SCREEN STYLES
   ============================================ */

.psp-options-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--psp-white);
}

/* Header */
.psp-options-header {
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
}

.psp-options-logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

/* Cards Container */
.psp-cards-container {
    flex: 1;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Option Card */
.psp-option-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--psp-white);
    transition: var(--psp-transition);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.psp-option-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--psp-shadow-lg);
}

.psp-option-card:active {
    transform: translateY(0);
}

/* Card Content */
.psp-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.psp-card-text {
    flex: 1;
    padding-right: 16px;
}

.psp-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
    color: var(--psp-white);
}

.psp-card-subtitle {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--psp-white);
    opacity: 0.9;
}

/* Card Button */
.psp-card-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: var(--psp-white);
    border: none;
    border-radius: 50px;
    color: var(--psp-text-dark);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--psp-transition);
    text-decoration: none;
}

.psp-card-btn:hover {
    background: #F3F4F6;
    transform: scale(1.02);
}

/* Bottom Illustration */
.psp-bottom-illustration {
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 180px;
}

.psp-bottom-illustration img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Small phones */
@media (max-width: 360px) {
    .psp-start-title {
        font-size: 28px;
    }

    .psp-start-subtitle {
        font-size: 14px;
    }

    .psp-card-title {
        font-size: 18px;
    }

    .psp-card-subtitle {
        font-size: 12px;
    }

    .psp-option-card {
        min-height: 120px;
        padding: 20px;
    }

    .psp-card-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Medium phones */
@media (min-width: 375px) {
    .psp-start-title {
        font-size: 34px;
    }

    .psp-logo img {
        height: 65px;
    }
}

/* Large phones */
@media (min-width: 414px) {
    .psp-start-title {
        font-size: 38px;
    }

    .psp-start-subtitle {
        font-size: 17px;
    }

    .psp-option-card {
        min-height: 150px;
    }

    .psp-card-title {
        font-size: 24px;
    }
}

/* Tablets */
@media (min-width: 768px) {
    .psp-start-content {
        padding: 40px;
        max-width: 600px;
        margin: 0 auto;
    }

    .psp-start-title {
        font-size: 48px;
    }

    .psp-start-subtitle {
        font-size: 20px;
    }

    .psp-start-bottom {
        padding: 30px 40px;
    }

    .psp-btn-start {
        max-width: 400px;
        margin: 0 auto;
        display: block;
    }

    .psp-cards-container {
        max-width: 600px;
        margin: 0 auto;
        padding: 0 40px;
    }

    .psp-option-card {
        min-height: 160px;
        padding: 32px;
    }

    .psp-card-title {
        font-size: 28px;
    }

    .psp-card-subtitle {
        font-size: 16px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .psp-start-content {
        max-width: 700px;
    }

    .psp-start-title {
        font-size: 52px;
    }

    .psp-cards-container {
        max-width: 700px;
        gap: 20px;
    }

    .psp-option-card {
        min-height: 180px;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .psp-start-main {
        padding-bottom: 10px;
    }

    .psp-start-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .psp-start-subtitle {
        font-size: 14px;
    }

    .psp-start-bottom {
        padding: 15px 20px;
    }

    .psp-btn-start {
        padding: 14px 24px;
    }

    .psp-bottom-indicator {
        margin-top: 15px;
    }

    .psp-cards-container {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .psp-option-card {
        flex: 1;
        min-width: 280px;
        min-height: 120px;
    }

    .psp-bottom-illustration {
        min-height: 100px;
        padding: 10px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.psp-fade-in {
    animation: pspFadeIn 0.6s ease-out;
}

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

.psp-slide-up {
    animation: pspSlideUp 0.5s ease-out;
}

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

/* Staggered animation delays */
.psp-delay-1 { animation-delay: 0.1s; }
.psp-delay-2 { animation-delay: 0.2s; }
.psp-delay-3 { animation-delay: 0.3s; }

/* Hide elements until animation */
.psp-animate-ready {
    opacity: 0;
}

.psp-animate-ready.psp-fade-in,
.psp-animate-ready.psp-slide-up {
    opacity: 1;
}

/* Page height */
.language-page {
    min-height: calc(100vh - 90px);
}

/* Selected card */
.selected-language-card {
    border: 2px solid #20b2aa;
    border-radius: 999px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Color dot */
.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* Scroll container */
.language-panel {
    height: calc(100vh - 380px);
    overflow: hidden;
}

/* Scrollable list */
.language-list {
    height: 100%;
    overflow-y: auto;
}

/* Language row */
.language-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
}

.language-item:hover {
    background: #f1f5f9;
}

.language-item.active {
    background: #bfe9e7;
}

/* Radio */
.language-item .radio {
    width: 15px;           /* size of the circle */
    height: 15px;
    border-radius: 50%;    /* makes it round */
    background-color: #e0f3ff; /* light blue background like your screenshot */
    margin-left: auto;
}

.language-item .radio i {       /* size of the check icon */
    color: #007bff;        /* check color, matches blue */
}

/* Sticky footer */
.language-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 100;
}

/* Continue Button Style */
.bottom-btn {
    width: 100%;
    padding: 13px 0;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(90deg, #0481C6, #004F79);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ============================================
   BPH / OAB CONTENT PAGE STYLES
   ============================================ */

/* Card static (no hover cursor) */
.psp-option-card.psp-card-static {
    cursor: default;
}

.psp-option-card.psp-card-static:hover {
    transform: none;
    box-shadow: none;
}

/* Card content column layout */
.psp-card-content-column {
    flex-direction: column;
    align-items: flex-start;
}

/* Card title with margin */
.psp-card-title-spaced {
    margin-bottom: 16px;
}

/* Back button wrapper */
.psp-back-wrapper {
    padding: 20px;
    text-align: center;
}

/* Back button link style */
.psp-back-link {
    display: inline-block;
    background: #0D7377;
    color: #ffffff;
}

