/*
 * Comprehensive Stylesheet for Simplot Rewards
 * This file contains styles for both the authentication pages and the dashboard.
 */

/* =======================================
   Font Imports
   ======================================= */
   @font-face {
    font-family: 'favorit_stdbold_expanded';
    src: url('../fonts/favoritstd-boldexpanded1-webfont.woff2') format('woff2'),
         url('../fonts/favoritstd-boldexpanded1-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'gothambook';
    src: url('../fonts/gotham-book-webfont.woff2') format('woff2'),
         url('../fonts/gotham-book-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* =======================================
   Base Body and General Layout
   ======================================= */
body {
    font-family: 'Inter', 'gothambook', sans-serif; /* Gotham Book for body text */
    background-color: #f0f2f5; /* Fallback color */
    background-image: url('../images/simplotrewards-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

/* Semi-transparent overlay for readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* Full-screen container for centering content on auth pages */
.full-height-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    position: relative;
}
.login-container {
    /* background-image: url(../images/simplot---logos.png);
    background-size: unset;
    background-position:center 98%;
    background-repeat: no-repeat; */
}.full-height-container.login-container:after{
    /* content: "";
    position: absolute;
    left: 0;
    top: 0;
    background-image: url(https://simplotrewards.com.au/assets/images/simplot---logos.png);
    background-repeat: no-repeat;
    height: 100%;
    width: 100%;
    background-position: 95% center;
    background-size: calc(100% / 3); */
}
.full-height-container.login-container:before {
    /* content: "";
    position: absolute;
    left: 0;
    top: 0;
    background-image: url(https://simplotrewards.com.au/assets/images/cash-in-your-carton.png);
    background-repeat: no-repeat;
    height: 100%;
    width: 100%;
    background-position: 5% center;
    background-size: calc(100% / 4); */
}
.header-font {
    font-family: 'favorit_stdbold_expanded', 'Inter', sans-serif; /* Favorit for headers */
}

/* =======================================
   Authentication Pages (Login, 2FA)
   ======================================= */
.login-logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 3rem !important;
    margin-top: -5rem;
}
.login-card {
    max-width: 450px;
}
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.1);
    border-color: #007bff;
}
.turnstile-wrapper {
    width: 100%;
}
.cf-turnstile,
.cf-turnstile iframe {
    width: 100% !important;
}
.password-toggle {
    position: absolute;
    right: 15px;
    top: 20%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.2rem;
    transition: color 0.2s ease-in-out;
    line-height: 1;
}
.password-toggle:hover {
    color: #333;
}
#toggleText {
    display: none;
}
@media (min-width: 576px) {
     #toggleText {
        display: inline;
        font-size: 0.9rem;
        vertical-align: middle;
    }
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* New styles for the loading button and spinner */
#loginButton, #verifyButton1, #submitBtn {
    position: relative;
    overflow: hidden;
}

#loginButton .spinner-border,
#verifyButton1 .spinner-border,
#submitBtn .spinner-border {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* =======================================
   Dashboard-Specific Styles
   ======================================= */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    background-color: #fff;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s; /* Add transition for hover effect */
}
/* Dashboard summary card hover effect */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
/* Style for clickable summary cards */
.card[onclick] {
    cursor: pointer;
}
/* Resetting padding for dashboard cards to be more compact */
.card.p-4 {
    padding: 1.5rem !important;
}

/* =======================================
   Custom Modal Styling (Used on both Auth and Dashboard)
   ======================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,.5);
    text-align: center;
}
.modal-header {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}
.modal-body {
    padding: 10px 0;
}
.modal-footer {
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
}
.modal-close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Dashboard */
/* This is the new style for the main content container */
.main-dashboard-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    /* max-width: 960px; Optional: Sets a max-width for large screens */
    margin: auto; /* Centers the card horizontally */
}

/* New style for the logo outside the main card, now left-aligned */
.standalone-logo {
    max-width: 180px;
    display: block;
}

/* Style for clickable cards */
.clickable-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* New style to make card header a flex container for alignment */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Style for the export icon */
.export-icon {
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

.export-icon:hover {
    color: #0d6efd;
}

/* =======================================
   Predictive Text Input Styles
   ======================================= */
.predictive-container {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #f8fafc;
}

.suggestion-item.selected {
    background-color: #e2e8f0;
}

/* Ensure predictive input appears seamlessly */
.predictive-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Hide original dropdown when predictive text is active */
.product-name[style*="display: none"] {
    display: none !important;
}