/* Selection Pages Styling */

/* Split page layout with pattern background */
.selection-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.selection-page-top {
    flex: 1;
    background-color: var(--color-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-smooth);
}

.selection-page-bottom {
    flex: 1;
    background: linear-gradient(to bottom, var(--color-white), var(--color-background));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Pattern image styling */
.selection-page-pattern-image {
    position: absolute;
    z-index: 2;
    width: 200px;
    height: auto;
    bottom: 0; /* Position at the bottom of top section */
    right: 0; /* Position at the right of top section */
    will-change: transform; /* Optimize for animations */
    margin: 0; /* Remove any margin */
    padding: 0; /* Remove any padding */
}

/* Pattern SVGs with specific rotations as required */
img[src*="Card_1.svg"] {
    transform-origin: center;
    transform: rotate(90deg); /* Rotate Card_1.svg by 90 degrees */
    animation: float-pattern-card1 6s ease-in-out infinite;
}

img[src*="Card_2.svg"] {
    transform-origin: center;
    /* Card_2.svg in its natural orientation with flat sides on all sides */
    animation: float-pattern 6s ease-in-out infinite;
}

img[src*="Card_3.svg"] {
    transform-origin: center;
    transform: rotate(180deg); /* Rotate Card_3.svg by 180 degrees */
    animation: float-pattern-card3 6s ease-in-out infinite;
}

/* Animations for cards with different rotations */
@keyframes float-pattern {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Animation for Card_1.svg with 90 degree rotation */
@keyframes float-pattern-card1 {
    0% {
        transform: translateY(0px) rotate(90deg);
    }
    50% {
        transform: translateY(-15px) rotate(90deg);
    }
    100% {
        transform: translateY(0px) rotate(90deg);
    }
}

/* Animation for Card_3.svg with 180 degree rotation */
@keyframes float-pattern-card3 {
    0% {
        transform: translateY(0px) rotate(180deg);
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
    }
    100% {
        transform: translateY(0px) rotate(180deg);
    }
}

/* Content styling */
.selection-page-content {
    z-index: 2;
    text-align: center;
    max-width: 80%;
}

.selection-page-top .section-title h1,
.selection-page-top .section-title p {
    color: var(--color-white) !important;
}

/* Logo positioning and styling */
.selection-page-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 2;
}

/* Make the logo appear white on the purple background */
.selection-page-top .selection-page-logo {
    /*filter: brightness(0) invert(1);  This makes the logo white */
    width: 184px;
}

/* Action blocks styling for selection pages */
.selection-page-bottom .action-block-grid {
    margin-top: 2rem;
}

/* Animations */

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

.selection-page-top::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--color-primary);
    border-radius: 50% 50% 0 0;
    z-index: 1;
}


.selection-page-content {
    animation: fadeIn 1s ease-out;
}

.action-block {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.action-block:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Logout button styling */
.logout-button {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 3;
    background-color: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-pill);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all var(--transition-smooth);
    text-decoration: none;
}

.logout-button:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

.logout-button i {
    margin-right: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Container is already column by default now */
    .selection-page-top,
    .selection-page-bottom {
        flex: none;
        width: 100%;
        min-height: 50vh;
    }

    .selection-page-logo {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 1rem;
    }

    .selection-page-pattern-image {
        width: 150px;
        top: calc(25vh - 100px); /* Adjust for smaller top section on mobile */
        right: 10px;
    }

    /* Maintain rotations on mobile */
    img[src*="Card_1.svg"] {
        /* Keep 90 degree rotation on mobile */
        transform: rotate(90deg);
    }

    img[src*="Card_3.svg"] {
        /* Keep 180 degree rotation on mobile */
        transform: rotate(180deg);
    }

    .logout-button {
        top: 1rem;
        right: 1rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}
