/* =========================================================
   CHOOSE PLAN STYLESHEET (Refactored)
   This file now only contains styles specific to this page.
   The global dialog styles have been moved to base.css.
   ========================================================= */

/* --- 1. HEADER & PAGE TITLE --- */
/* Rule to ensure the home icon link is always white and not purple (visited). */
.top-bar-back-arrow,
.top-bar-back-arrow:visited {
    color: var(--text-primary);
    text-decoration: none;
}

/* Styles to properly center the title in the header bar on choose_plan.php */
.top-bar-new-ui h1 {
    flex-grow: 1;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    padding-right: 20px;
    padding-bottom: 8px;
}

/* --- 2. GRID CONTAINER --- */
.diet-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two cards per row */
    gap: 20px;
    padding: 20px;
    /* The parent .main-content has a gap. This negative margin adjusts it. */
    margin-top: -14px;
}

/* --- 3. FLIP CARD MECHANICS --- */
.flip-card {
    background-color: transparent;
    width: 100%;
    aspect-ratio: 1 / 1.2; /* Taller than it is wide */
    perspective: 1000px; /* Needed for the 3D effect */
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.7s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
}

.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* For Safari */
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
}

/* --- 4. CARD FACE STYLING --- */
.flip-card-front {
    background-color: var(--button-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.flip-card-front h2 {
    font-size: 20px;
    margin: 0;
}

.is-secondary-card .flip-card-front h2 {
    color: var(--text-secondary);
}

.coming-soon-warning {
    font-size: 12px;
    font-weight: 700;
    color: var(--error-red);
    margin-top: 8px;
}

.flip-card-back {
    background-image: linear-gradient(to bottom, var(--accent-green), var(--darker-accent-green));
    color: var(--background-page);
    transform: rotateY(180deg); /* The back starts off flipped */
}

.flip-card-back h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.flip-card-back p {
    font-size: 14px;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.select-btn {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
    border-radius: 20px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.select-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Note: All .dialog styles have been moved to base.css */

/* ===== EOF ===== */