﻿﻿/* ===================================
   UserResults - Country Selection Grid
   Based on Figma Design
   =================================== */

/* Form tag - ensure it doesn't interfere with flex layout */
#frmMain {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}

/* Admin back link styling */
.userresults-container .admin-back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 14px;
    color: #5F97FB;
    text-decoration: none;
}

.userresults-container .admin-back-link:hover {
    text-decoration: underline;
}

.userresults-container .admin-back-link .glyphicon {
    margin-right: 5px;
}

.country-selection-section {
    padding: 0;
}

.country-selection-section h2 {   
    font-size: 20px;
    color: #445065;
    margin-bottom: 15px;
}

.country-selection-section .subtitle {
    font-size: 14px;
    color: #445065;
    margin-bottom: 10px;
}

.country-selection-section .note-text {
    font-size: 14px;
    font-weight: 400;
    color: #445065;
    margin-bottom: 20px;
}

.country-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.country-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #808897;
    border-radius: 6px;
    background-color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
    flex: 0 1 calc(25% - 12px);
}

.country-item:hover {
    border-color: #5F97FB;
    background-color: #f8f9fa;
}

.country-item.selected {
    border-color: #5F97FB;
    background-color: #EBF3FF;
}

.country-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Checkbox styling */
.country-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Flag icon */
.country-item .country-flag {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}

.country-item .country-flag .fi {
    font-size: 32px;
    line-height: 32px;
}

/* Country name */
.country-item .country-name {
    font-size: 16px;
    color: #445065;
    flex: 1;
}

/* Continue button */
.btn-continue-primary {
    background-color: #5F97FB;
    border-color: #5F97FB;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.btn-continue-primary:hover,
.btn-continue-primary:focus {
    background-color: #4A85E8;
    border-color: #4A85E8;
    color: #FFFFFF;
}

/* Responsive design */
@media (max-width: 1200px) {
    .country-item {
        flex: 0 1 calc(33.333% - 10px);
    }
}

@media (max-width: 992px) {
    .country-item {
        flex: 0 1 calc(50% - 10px);
    }
}

@media (max-width: 576px) {
    .country-item {
        flex: 0 1 100%;
    }
}

/* Error message */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Data missing note */
.data-missing-note {
    font-size: 14px;
    color: #445065;
    margin-top: 15px;
    margin-bottom: 15px;
    font-style: italic;
}

/* Form horizontal - Now full width of browser */
/* UserResults container - Full height of main-content */
.userresults-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 0 auto !important;
    min-height: 0 !important;
}

/* Title wrapper - Transparent background, constrained width, centered */
.userresults-container .userresults-title-wrapper {
    width: 100%;
    max-width: 1352px;
    max-height: 150px;
    flex-shrink: 0 !important;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Title styling - Only for UserResults page */
.userresults-container .userresults-title-wrapper h2 {
    width: auto;
    max-width: 90%;
    font-size: 44px;
    line-height: 54px;
    color: #445065;
    margin: 0;
    text-align: center;
}

/* White section with white background - takes remaining height */
.userresults-container .userresults-white-section {
    width: 100% !important;
    background: #FFFFFF !important;
    padding: 40px 20px;
    flex: 1 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

/* Inner container with constrained width */
.userresults-container .userresults-content-inner {
    width: 100%;
    max-width: 1352px;
    margin: 0 auto;
    flex: 1 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

@media (min-width: 1300px) {
    .userresults-container .userresults-title-wrapper {
        padding: 114px 20px 40px 20px;
    }
    
    .userresults-container .userresults-white-section {
        padding: 40px 20px;
    }
}

@media (max-width: 1024px) {
    .userresults-container .userresults-title-wrapper {
        height: 200px;
        padding: 24px 40px;
    }
    
    .userresults-container .userresults-title-wrapper h2 {
        font-size: 36px;
        line-height: 44px;
    }
    
    .userresults-container .userresults-white-section {
        padding: 24px 40px;
    }
}

@media (max-width: 768px) {
    .userresults-container .userresults-title-wrapper {
        max-height: 70px;
        padding: 24px 20px;
    }
    
    .userresults-container .userresults-title-wrapper h2 {
        font-size: 28px;
        line-height: 34px;
        white-space: normal;
    }
    
    .userresults-container .userresults-white-section {
        padding: 24px 20px;
    }
}

.button-container {
    text-align: left;
    margin-top: 20px;
}

