/* MODAL */
#downloadmodal {
	background-color: transparent;
}

#downloadmodal .modal-content {
	background-color: var(--MODAL_BG);
	color: var(--MODAL_TXT_COLOR);
}

#downloadmodal .modal-content .modal-header {
    position: relative;
    gap: 5px;
    min-height: 50px;
    width: auto;
    height: auto;
    z-index: 0;
    border-bottom: none;
    background: var(--MODAL_HEADER_BG);
    border-radius: 10px 10px 0 0; 
    display: flex;
    justify-content: center;
    align-items: center;
}

#downloadmodal .modal-content .modal-header .btn-modalClose {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: var(--MODAL_CLOSE_BTN_BG);
    border: none;
    color: var(--MODAL_CLOSE_BTN_COLOR);
    font-size: var(--ICON_SMALL_FONT_SIZE);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    z-index: 2;
    opacity: 1; /* Override any Bootstrap defaults */
}

#downloadmodal .modal-content .modal-header .btn-modalClose i {
    color: inherit;
    font-size: inherit;
    margin: 0;
}

#downloadmodal .modal-content .modal-header .title {
	font-size: var(--SUBHEADER_FONT_SIZE);
    font-weight: var(--REG_FONT_WEIGHT);
    text-transform: uppercase;
}

#downloadmodal .modal-content .modal-body {
	border-radius: 0 0 5px 5px;
}

#downloadmodal .modal-content .modal-header .btn-modalClose i{
	color: var(--MODAL_CLOSE_BTN_COLOR);
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content{
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: flex-start;
	gap: 0;
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .label{
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 18px;
	padding-bottom: 10px;
	padding-left: 0;
	color: var(--TXT_COLOR_1)
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .label .text{
	font-size: var(--BODY_TXT_FONT_SIZE);
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .downloadQR-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px;
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .downloadQR-item:nth-child(2) {
	border-left: 1px solid rgba(255, 255, 255, 0.2);
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .label .icon{
	font-size: 20px;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 30%;
	margin-right: 8px;
	padding: 0;
}

/* Android icon - Cyan circular background */
#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .label .icon:has(.fa-android) {
	background: var(--SIDE_NAV_MENU_LIST_HOVER_BG);
}

/* iOS icon - Blue circular background */
#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .label .icon:has(.fa-apple) {
	background: var(--SIDE_NAV_MENU_LIST_HOVER_BG);
	color: var(--SECONDARY_COLOR);
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .form-group{
	display: flex;
	align-items:center;
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .form-group .form-wrap{
	display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .form-group .form-wrap i{
	font-size:18px;
	padding-left: 10px;
	cursor: pointer;
}



.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  flex-direction: column;
}

.download-page-title {
  font-size: var(--HEADER_FONT_SIZE);
  font-family: var(--SECONDARY_FONT_FAMILY);
  font-weight: var(--MED_FONT_WEIGHT);
  text-align: left;
  text-align: center;
  padding: 1rem;
  color: var(--TXT_COLOR_1);
}

.download-list-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  justify-content: center;
  flex: 1;
}

.card-list-item{
	display: flex;
    border-radius: 8px;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    box-shadow: 0px 0px 5px 0px #00000040;
    background-color: var(--CARD_1_BG);
    width: 100%;
    max-width: 180px; 
    margin: 0 auto;
}

.card-item {
    max-height: 148px;
    height: 148px;
    display: flex;
    background-color: var(--CARD_1_BG);
    padding: 25px; 
    align-items: center; 
    justify-content: center;
}

.card-image {
    max-width: 214px;
    max-height: 214px;
    border-radius: 8px;
    margin-top: auto;
    margin-bottom: auto;
}

.buttons {
    display: flex;
    justify-content: space-around;
}

.download-list-wrap button,
.buttons button {
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    background-color: var(--PRIMARY_BTN_BG);
    color: var(--PRIMARY_BTN_COLOR);
}

.download-list-wrap button i, .buttons button i{
	font-size: 20px;
}

.buttons button.android-btn {
    background: var(--THIRD_BTN_BG);
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    width:100%;
    color: var(--TXT_COLOR_1);
    border: var(--THIRD_BTN_BORDER);
}

button.android-btn.single {
   padding: 10px 62px !important;
   width:100%;
}

.buttons button.ios-btn {
    background: var(--PRIMARY_BTN_BG);
    color: var(--TXT_COLOR_2);
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    width:100%;
}

.download-list-wrap button:hover, .buttons button:hover
    opacity: 0.8;
}

@media (min-width: 1280px){
	
	.download-area{
		padding: 0rem 1.5rem 3rem;
	}
	
	.download-area .download-list-wrap{
		grid-gap: 1rem;
	    grid-template-columns: repeat(4,minmax(0,1fr));
	}
	
	.download-area .download-list-wrap .download-list-item{
		flex: 1;
	}
}

/* MODAL */

/* Labels (Username/Password) */
#downloadmodal .form-group label {
    color: var(--TXT_COLOR_1);
    font-family: var(--PRIMARY_FONT_FAMILY);
    font-size: var(--BODY_SMALL_TXT_FONT_SIZE);
    display: flex;
    align-items: center;
}

#downloadmodal input.form-control {
    background-color: var(--INPUT_BG);          /* matches site inputs */
    border: var(--INPUT_BORDER);                /* matches site borders */
    color: var(--INPUT_TXT_COLOR);              /* white text */
    font-family: var(--PRIMARY_FONT_FAMILY);
    font-size: var(--BODY_SMALL_TXT_FONT_SIZE);
    border-radius: 5px;
    height: 38px;
}

#downloadmodal input.form-control:focus {
    background-color: var(--INPUT_BG);
    box-shadow: none;
    border-color: var(--SECONDARY_COLOR);       /* Optional: Highlight color */
}

#downloadmodal .registrationPassIcon {
    color: var(--TXT_COLOR_1);                  /* White icon */
    margin-left: 10px;
    font-size: var(--ICON_SMALL_FONT_SIZE);
    cursor: pointer;
}

@media (max-width: 768px){
	
	.download-area{
		padding: 0rem 1rem 3rem;
	}
	
	.download-area .download-list-wrap .download-list-item{
		width: 265px;
	    display: flex;
	    justify-content: center;
	}
	
	.download-area .download-list-wrap .download-list-item .download-list-card{
		grid-gap: 1.5rem;
	}
	
	#downloadmodal .modal-dialog {
        /* Position: Anchor to the bottom of the screen */
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        margin: 0;
        top: auto;             /* Override any top positioning */
        transform: none;       /* Remove centering transform */
        
        /* Sizing: Full width, auto height */
        max-width: 100%;
        height: auto !important; 
        display: flex;
        flex-direction: column;
    }

    /* Style the content to look like a Bottom Sheet */
    #downloadmodal .modal-content {
        height: auto !important;
        border: none;
        
        /* Round the top corners, keep bottom square */
        border-radius: 15px 15px 0 0; 
        
        /* Ensure it sits cleanly at the bottom */
        margin-bottom: 0;
    }
	
	#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content {
        flex-wrap: wrap;       /* Allows items to stack */
        justify-content: center; /* Centers the single item */
    }

    /* 2. Fix the "Huge" Single QR Code issue */
    #downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .downloadQR-item {
        flex: 0 0 50%;         /* Force item to be 50% width (same as the 2-item view) */
        max-width: 50%;        /* Stop it from growing to 100% */
        margin: 0 auto;        /* Center it if it's on its own line */
        border: none !important; /* Remove side borders on mobile for cleaner look */
    }

    /* 3. Make Username/Password fields take full width on mobile */
    #downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .form-group {
        flex: 0 0 100%;        /* Full width */
        width: 100%;
        margin-bottom: 15px;   /* Add space between form and QR */
        padding: 0 15px;       /* Add side padding so it doesn't touch edges */
    }
    
    /* Adjust form labels and inputs for mobile alignment */
    #downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .form-group .col-4,
    #downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .form-group .col-8 {
        padding: 0;
    }
	
	#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .label {
		font-size: 16px;
		flex-wrap: nowrap;
	}
	
	#downloadmodal .modal-dialog .modal-content .modal-body .downloadQR-content .label .text {
		font-size: var(--BODY_TXT_FONT_SIZE);
	}
	
}