/* ====================================================
   MAIN CONTAINER
   ==================================================== */

.login-container {
    max-width: 800px !important;
}

.didactik-login {
    max-width: 700px;
    max-height: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ====================================================
   HEADER
   ==================================================== */

.country-selection-title {
    font-size: 16px;
    color: #5856D6;
    margin-bottom: 15px;
    text-align: left;
    font-weight: 500;
}

/* ====================================================
   LAYOUT GRID
   ==================================================== */

.regions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, auto);
    gap: 12px 20px;
    margin: 15px 0;
    position: relative;
}



.country-region {
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
    z-index: 2;
}

.region-sm::before,
.region-fsm::before,
.region-mea::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #5856D6;
    transform: translateX(-50%);
    z-index: 1;
}

.region-fsm::after,
.region-esm::after,
.region-cee::after,
.region-mea::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background-color: #5856D6;
    z-index: 1;
}

.region-latam::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    top: 0;
    height: 1px;
    background-color: #5856D6;
    z-index: 1;
}
.region-latam {
    grid-column: 1 / -1;
}



/* ====================================================
   REGION TITLES
   ==================================================== */

.region-title {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
    padding: 5px 0;
    letter-spacing: 1px;
}

/* ====================================================
   COUNTRY GRIDS
   ==================================================== */

.countries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.region-latam .countries-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* ====================================================
   COUNTRY ITEMS
   ==================================================== */

.country-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: white;
    min-height: 28px;
    font-size: 11px;
    transition: all 0.2s ease;
}

.country-item:hover {
    background: #f0f0f0;
    border-color: #bbb;
    color: #333;
    text-decoration: none;
}

.country-flag {
    font-size: 16px;
    margin-right: 6px;
    line-height: 1;
}

.country-flag-svg {
    width: 20px;
    height: 15px;
    margin-right: 6px;
    object-fit: cover;
    border-radius: 2px;
}

.country-name {
    font-size: 11px;
    font-weight: 500;
    flex: 1;
}

/* ====================================================
   RESPONSIVE DESIGN
   ==================================================== */

@media (max-width: 768px) {
    .didactik-login {
        max-width: 95%;
        padding: 15px;
        margin: 10px auto;
    }

    .regions-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .regions-container::before {
        display: none;
    }

    .region-latam {
        grid-column: 1;
    }

    .region-latam .countries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .login-container {
        width: auto !important;
        max-width: 700px !important;
        border-radius: .5rem;
    }
}

@media (max-width: 480px) {
    .didactik-login {
        padding: 12px;
    }

    .regions-container {
        gap: 15px;
    }

    .countries-grid,
    .region-latam .countries-grid {
        grid-template-columns: 1fr;
    }

    .country-item {
        padding: 8px;
        min-height: 36px;
    }
}

/* ====================================================
   GLOBAL STYLES
   ==================================================== */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 10px 0;
    font-family: Poppins, Arial, sans-serif;
}

/* ====================================================
   SAML LOGIN FORM STYLES
   ==================================================== */

.loginform-saml {
    max-width: 600px;
    min-height: 500px;
    margin: 0 auto;
    padding: 30px;
    background: white;
}

.login-identityproviders {
    display: none;
}