/* CSS for Phone Filter Page */
div.fixme {
	width: 100%; 
	max-width: 700px;
	background: white; 
	z-index: 50;
	box-sizing: border-box;
}
div.fixme2 {
	width:100%; z-index:50;
}
#filter-top-div {
	max-width: 100%; 
	float: left; 
	display: block;
	padding-left: 5px; 
	padding-top: 2px; 
	padding-bottom: 6px;
	margin-bottom: 2px;
	border-bottom: 1px solid #ddd; 
	position: relative;
	overflow-x: auto;
	box-sizing: border-box;
}

div #filter-top-sub1 {
	float:left; max-width:400px; vertical-align:bottom;}

div #filter-top-sub2 {
	float:right; max-width:100px; vertical-align: bottom; height: 40px; border-bottom:5px; padding-right: 5px;
}
#temukan {
	bottom:0; margin-top:19px;
}

#filter-top-sub2 label {
	display: block; font-size:12px; font-weight:normal;
	margin: 0px 0 0 0;
}

#filter-top-sub2 .overflow {
	height: 200px;
}

div.filter-box {
	float:left;
	margin: 1px;
	height: 230px;
	width: 160px;
	border: 1px solid #ddd;
	padding-top: 3px;
	padding: 4px;
	transition: box-shadow .3s ease-out;
}

div.filter-box:hover {
	-webkit-box-shadow:0 0 3px #0F0; 
	-moz-box-shadow: 0 0 3px #0F0; 
	box-shadow:0 0 3px #0F0;
}


div.filter-box p {
	font-size: 10px; margin: 0px 0px 0px;
}
div.filter-slider {
	font-size:9px; margin:3px; 
}
.filter-box input[type="text"] {
	margin: 0px 0px 0px; padding: 0px 0px;
}
.filter-box input[type="checkbox"] {
	margin: 0px 0px 0px; padding: 0px 0px; font-size:10px; 
}

.filter-box .ui-button-text {
	font-size:10px;
}

.sub-filter {
	padding-top:6px;
}

#screen-res .sub-filter-1 label {
	width: 92%;
}

#versionOS .sub-filter label {
	font-size: 10px; margin-right: 4px; width: 100%;
}

#phoneOS label, #wifi label, #simcardnum label, #RAM-type label {
	font-size: 10px; margin-right: 4px; width: 100%;
}

#versionOS2 label {
	font-size: 10px; margin-right: 4px; width: 100%;
}

#versionOS3 label, #versionOS4 label, #versionOS5 label {
	font-size: 10px; margin-right: 4px; width: 100%;
}

div #hardware-box, #software-box, #physical-box {
	padding-left: 1.5em;
	max-width: 100%;
	box-sizing: border-box;
}

.sub-filter-1 {
	float:left;
	width: 68px;
	margin-right: 2px;
}

#versionOS2 .sub-filter-1 {
	padding-top: 6px;
}

div #accord {
	padding: 2px 5px 0px 5px;
	overflow-x: auto;
	box-sizing: border-box;
}

div #hasil-pilah {
	clear:left;
	min-height: 64px;
	width: 100%;
	padding: 2px 2px 2px 5px;
	height: auto;
	font-size: 9px;
	overflow-x: auto;
	box-sizing: border-box;
}

/* Results container wrapper */
.results-section {
	
	width: 100%;
	margin: 0.6em auto;
	padding: 6px 6px 8px 6px; /* match spacing used across other sections */
	box-sizing: border-box;
	clear: left;
}

.results-wrapper {
	width: 100%;
	overflow-x: auto;
	box-sizing: border-box;
	display: block;
}

/* Ensure hasil-pilah inside the results-section keeps the same sizing and spacing */
.results-section #hasil-pilah {
	clear: left;
	min-height: 64px;
	width: 100%;
	padding: 6px 8px 6px 5px;
	height: auto;
	font-size: 9px;
	overflow-x: auto;
	box-sizing: border-box;
	background: transparent;
}

/* Slightly adjust nav-con inside results-section to align visually */
.results-section .nav-con {
	clear: left;
	width: 100%;
	padding: 6px 0 6px 1px;
	background: #eee; /* subtle differentiation while keeping in sync */
	height: 2.2em;
	box-sizing: border-box;
}

/* Keep responsive behavior intact */
@media only screen and (max-width: 768px) {
	.results-section { padding: 0.6em 0.4em; }
	.results-section .nav-con { padding: 6px 4px; }
}

div #status-pilah {
	float: left;
	max-width: 100%;
	padding-left: 5px;
	height: 2em;
	font-size: 14px;
}
div #status-pilah2 {
	float:left;
	max-width: 100%;
	height: 2em;
	font-size: 14px;
}
div .nav-con {
	clear:left; 
	width: 100%; 
	padding: 5px 0 5px 1px; 
	background: #ddd; 
	height: 2.2em;
	box-sizing: border-box;
}
div #navi-pilah1 {
	float:right; width:36px; padding-right: 5px;vertical-align: top;
}
div #navi-pilah1 button {
	float:right; width:35px; height: 1.8em; font-size: 12px; 
}
div #navi-pilah2 {
	float:right; width:36px; padding-right: 5px;vertical-align: top;
}
div #navi-pilah2 button {
	float:right; width:35px; height: 1.8em; font-size: 12px; 
}
div #navi-pilah3 {
	float:right; width:36px; padding-right: 5px;vertical-align: top;
}
div #navi-pilah3 button {
	float:right; width:35px; height: 1.8em; font-size: 12px; 
}
div #navi-pilah4 {
	float:right; width:36px; padding-right: 5px;vertical-align: top;
}
div #navi-pilah4 button {
	float:right; width:35px; height: 1.8em; font-size: 12px; 
}
div .filter-result {
	float: left;
	width: 160px;
	height: 275px;
	overflow: hidden;
	border: 2px solid transparent; /* Always 2px border, transparent by default */
	padding-top: 5px;
	margin: 8px 10px;
	border-radius: 10px;
	line-height: 170%;
	transition: all .3s ease-out;
	position: relative;
	background-color: white;
	box-sizing: border-box; /* Ensure border is included in total size */
}

.filter-result img {
	margin:6px auto 0 auto; padding: 3px 0 0 0;
}


div .filter-result:hover {
	-webkit-box-shadow:0 0 3px #0F0; 
	-moz-box-shadow: 0 0 3px #0F0; 
	box-shadow:0 0 3px #00FF00; background-color:#fff;
	
}

div .filter-result h6 {
	height: 1.6em; width:100%;
	text-align: center; line-height: 1.2em; 
}

.filter-result-detail {
	padding: 5px 5px; margin: 0; text-align: center; font-size: 9.5px; background-color: #f1f1f1; transition: all .3s ease-out;
}

input[type="checkbox"].pilah-check {
	float:right; visibility: hidden; position:absolute; left: 82%;
}
div .filter-result:hover input[type="checkbox"].pilah-check{
	visibility: visible; box-shadow:0 0 5px #00FF00;
}

div .filter-result:hover .filter-result-detail {
	background-color: #f8f8f8; cursor: default;
}

input[type="checkbox"].pilah-check:active{
	visibility: visible; box-shadow:0 0 5px #00FF00;
}
input[type="checkbox"].pilah-check:checked {
	float:right; visibility: visible;box-shadow:0 0 5px #00FF00;
}
.pilah-check-text {
	float:right;
}

div .detil {
	display:none;
}
div #filter-brand{
	overflow-y:scroll; overflow-x:hidden; width: 98%; height:71%; border:1px solid #ddd; font-size:10px; margin-top:2px; padding: 2px;
}
div #filter-brand p{
	display:inline;
}
a#check-all {
	float:left; font-size:9px; padding:3px 0 3px 1px; position:relative; bottom:0; display:block; text-decoration: none; color: black; 
}
a#check-all:hover {
	cursor:pointer; color:#0061a7;
}
a#clear-all {
	float:right;font-size:9px;padding:3px 3px 3px 0; position:relative; bottom:0; display:block; text-decoration: none; color: black;
}
a#clear-all:hover {
	cursor:pointer; color:#0061a7;
}

#loading {
	transition: all 0.5s ease-out;
	width: 100%;
	height: 100%;
	top: 0px;
	left: 0px;
	position: fixed;
	display: block;
	opacity: 0.8;
	background-color: #000;
	z-index: 99;
	text-align: center;
}

#loading-image {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 100; opacity: 1.0;
}

#loading-image p {
	transition: all 0.5s ease-out;
	font-size: 24px; font-weight: bold;
	color: #00FF00; text-shadow: 0 0 10px white;
}

.myButton {
	-moz-box-shadow:inset 0px 1px 0px 0px #54a3f7;
	-webkit-box-shadow:inset 0px 1px 0px 0px #54a3f7;
	box-shadow:inset 0px 1px 0px 0px #54a3f7;
	background-color:#007dc1;
	-moz-border-radius:3px;
	-webkit-border-radius:3px;
	border-radius:3px;
	border:1px solid #124d77;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family: "Open Sans", Helvetica, Arial, sans-serif;
	font-size:auto;
	padding:0px 5px;
	text-decoration:none; height:1.8em;
}
.myButton:hover {
	background-color:#0061a7;
}
.myButton:active {
	position:relative;
	top:1px;
}
.myButton:disabled {
	opacity: 0.5; cursor:default;
}
.myButton:active:disabled {
	position:relative;
	top:0px;
}
/* banding-transit box style - Updated for seamless integration */
.banding-transbox {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #ccc;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    padding: 6px 0;
    transition: transform 0.3s ease-out;
    font-family: "Lato", "Open Sans", Helvetica, Arial, sans-serif;
}

.banding-inner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

#bandingkan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.banding-header {
    flex: 0 0 auto;
}

.banding-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
}

.banding-slots {
    display: flex;
    flex: 1;
    gap: 10px;
    justify-content: center;
}

.phone-banding-div, .phone-banding-div-stick {
    border-radius: 4px;
    padding: 5px 10px;
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    position: relative;
    max-width: 200px;
    margin: 0;
    backdrop-filter: none;
    box-shadow: none;
}

.phone-banding-div:not(.sumpet), .phone-banding-div-stick:not(.sumpet) {
    border: 2px solid #3baeda !important;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f8ff 100%) !important;
}

/* Override sumpet to show placeholders */
.banding-slots .phone-banding-div.sumpet, 
.banding-slots .phone-banding-div-stick.sumpet {
    display: flex !important;
    background: #eee;
    border: 1px dashed #ccc;
    color: #999;
    justify-content: center;
}

.banding-slots .phone-banding-div.sumpet::after, 
.banding-slots .phone-banding-div-stick.sumpet::after {
    content: "Kosong";
    font-style: italic;
}

.banding-slots .phone-banding-div.sumpet .closer,
.banding-slots .phone-banding-div-stick.sumpet .closer {
    display: none;
}

.banding-action {
    flex: 0 0 auto;
	display: flex;
    gap: 10px;
}

.banding-transbox input[type="submit"] {
    height: 40px;
    padding: 0 20px;
    background: linear-gradient(135deg, #00FF00 0%, #00cc00 100%);
    border: none;
    border-radius: 4px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(0,255,0,0.3);
    margin: 0;
}

.banding-transbox input[type="submit"]:hover {
    background: linear-gradient(135deg, #00cc00 0%, #00aa00 100%);
    box-shadow: 0 4px 12px rgba(0,255,0,0.4);
    transform: translateY(-1px);
}

/* Mobile Layout */
@media (max-width: 768px) {
    .banding-header {
        display: none;
    }
    
    #bandingkan {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 40px 40px;
        gap: 5px;
    }
    
    .banding-slots {
        display: contents;
    }
    
    .phone-banding-div, .phone-banding-div-stick {
        max-width: none;
        width: 100%;
        height: 100%;
        margin: 0;
    }
    
    #phone-1-div { grid-row: 1; grid-column: 1; }
    #phone-2-div { grid-row: 1; grid-column: 2; }
    #phone-3-div { grid-row: 2; grid-column: 1; }
    #phone-4-div { grid-row: 2; grid-column: 2; }
    
    .banding-action {
        grid-row: 4;
        grid-column: 1 / span 2;
        display: flex;
        flex-direction: row;
        gap: 5px;
        width: 100%;
    }
    
    .banding-transbox input[type="submit"] {
        flex: 4;
        height: 40px;
        padding: 0;
        margin: 0;
    }
    
    .banding-clear-btn {
        flex: 1;
        height: 40px;
        padding: 0;
        font-size: 13px;
        margin: 0;
    }
    
    span.closer {
        visibility: visible !important;
        font-size: 2.2em !important;
        top: 15px !important;
        transform: translateY(-50%);
        right: 5px !important;
    }
    
    span.info-box {
        font-size: 1em;
    }
}

.banding-transbox-title {
    display: none;
}

span.info-box {
    font-size:13px;
    padding:0 2px 0 5px;
    transition: all .3s ease-out;
    cursor: default;
    /* Additions for overflow handling */
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
    line-height: 1.2;
}
span.closer {
    position: absolute;
    top: 0px;
    right: 2px;
    font-size: 2.2em;
    color: #ff4444;
    visibility: hidden;
    opacity: 0.7;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease-out;
    background: transparent;
    margin: 0;
    z-index: 2;
}

span.closer:hover {
    opacity: 1;
    font-size: 2.2em;
    color: #ff4444;
    text-shadow: 0 0 8px #ff8888;
    transform: scale(1.1);
}
.phone-banding-div:hover span.closer {
	cursor:pointer; visibility: visible; opacity:1;
}

/* Clear Button Styles */
.banding-clear-btn {
    height: 40px;
    padding: 0 15px;
    background: #f44336;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-transform: uppercase;
}

.banding-clear-btn:hover {
    background: #d32f2f;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    transform: translateY(-1px);
}

/*
.phone-banding-div{
	transition: all .2s ease-out; background-color:#f2f2f2; border-bottom:2px solid white; }
	
.phone-banding-div:hover {
	background-color:#ddd;
}
*/

/*
.banding-transbox {
	transition: visibility 0s, opacity 0.5s ease-out;
}
*/

.kasat {
    visibility: hidden;
    opacity: 0;
    transform: translateY(100%);
}
.sumpet {
	display:none;
}

#pesan {
	clear:left;
	font-size:11px; color:red; background: yellow; border-radius:10px; padding:5px;
}

.header-container {
	height: 30px; width: 100%; vertical-align: bottom; 
}

.header-container p {
	float:left; vertical-align: bottom; 
}

.selector-container {
	float:right; vertical-align: top; width:144px; height: 40px; margin-left: 20px;
}

.selector-container input[type="text"] {
	margin: 0px 0px 0px; padding: 0px 0px;
}

.selector-container label {
	font-size: 12px; margin-bottom: 2px;
}

.filter-container {
	float:right; vertical-align: top; width:100px; vertical-align: bottom; height: 45px; margin-bottom:6px; margin-left: 8px; margin-right: 5px;
	
}

.filter-container input[type="text"] {
	margin: 0px 0px 0px; padding: 0px 0px; font-size: 12px;
}

.filter-container label {
	display: block; font-size:12px; font-weight:normal;
	margin: 0px 0 0 0;
}

label.select-label {
	margin-bottom: 5px;
}

#radius {
	margin-top: 13px;
	margin-bottom:10px;
}

span.model-name {text-decoration: none; color: #4b4b4b; font-size: 14px; line-height: 30%;}
span.model-name:hover { text-decoration: none; color: #000;}

/* Filter page selected phone styling */
.filter-result.selected-phone {
    border: 2px solid #2196f3 !important;
    box-shadow: 0 0 12px 2px rgba(33, 150, 243, 0.4);
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f8ff 100%) !important;
    transition: all 0.3s ease;
    margin: 1px; /* Restore normal margin since border size is now consistent */
}

.filter-result.selected-phone:hover {
    box-shadow: 0 0 15px 3px rgba(33, 150, 243, 0.6);
    transform: translateY(-1px);
}

.filter-result.selected-phone .pilah-check {
    accent-color: #2196f3;
    visibility: visible !important;
}


/*Media Queries - Must be bottom most*/
/*For browser/screen widths less than 768px*/
@media only screen and (max-width: 768px) {
	input#temukan {
		font-size: 0.9em;
		padding: 2em 0.1em;
		margin-top: 1px;
		text-align: center;
	}

	/* Use grid with auto-fill/minmax so boxes behave like desktop when space allows.
	   Keep the header and any immediate <p> inside #hardware-box spanning full width at the top. */
	div#hardware-box {
		padding: 1em;
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 0.6rem;
		align-items: start;
		box-sizing: border-box;
	}

	/* Force header and the specs/title paragraph to take the full row at the top */
	div#hardware-box > .header-container,
	div#hardware-box > p {
		grid-column: 1 / -1;
		align-self: start;
		/* keep the header visible if user scrolls inside the container */
		position: sticky;
		top: 0;
		z-index: 3;
		background: inherit; /* avoid overlap visual issues */
		padding-top: 0;
		padding-bottom: 0.2rem;
	}

	div#hardware-box p {
		float: none;
		margin: 0.2rem 0;
		text-align: left;
	}

	div.selector-container {
		float: left;
		width: auto;
		height: auto;
		margin-left: 0; margin-bottom: 1em;
	}

	div.header-container {
		float: none;
		width: auto;
		height: auto;
		text-align: left;
	}

	/* Let filter-box items be flexible so the grid can size them. Remove scrolls and fixed heights. */
	div.filter-box {
		float: none;
		margin: 0;
		overflow: visible;
		width: auto;
		height: auto; /* Allow height to grow */
		min-height: 180px; /* Minimum height */
		min-width: 150px; /* match min column size */
		box-sizing: border-box;
		align-self: start; /* align to top of grid cell */
		padding-bottom: 5px;
	}

	/* Slightly adjust filter-result for mobile */
	div.filter-result {
		width: 48%; 
		height: 280px; 
		overflow-y: hidden;
		float: left;
		margin: 1%;
	}

	input.pilah-check {
		visibility: visible !important; margin-right: 10px; position: absolute;
	}

	div#loading {
		/* Mobile loading styles */
		position: fixed;
		width: 100%;
		height: 100%;
	}

	div#loading-image {
		top: 50%;
		left: 20%;
	}

	/* For slightly larger small screens, allow more columns automatically via auto-fill */
}

/* Car Result Inner Structure Styles (Adapted for Phone) */
.car-result {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    box-sizing: border-box;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    text-align: center;
}

.car-model-name {
    height: 30%;
    min-height: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2px 4px;
    font-size: 1.8em;
    font-weight: bold;
    color: #222;
    margin-bottom: 0;
    letter-spacing: .5px;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    transition: all .3s;
    line-height: 1.2em;
}

.car-model-name a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.car-model-name .maker {
    font-size: 0.9em;
    font-weight: normal;
}

.car-model-name .model {
    font-weight: bold;
}

.car-year-info {
    height: 10%;
    min-height: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #666;
    font-weight: 400;
    padding: 0 8px;
    transition: all 0.3s;
    background: transparent;
}

.car-row {
    height: 15%;
    min-height: 15%;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    background: #f4faff;
    border-top: 1px solid #e0eaf6;
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
}

.car-details-box {
    border-radius: 0;
    padding: 0px 2px;
    color: #333;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
	
}

.car-details-box.half {
    width: 50%;

}

.car-details-box.full {
    width: 100%;
}

.car-details-box.text-xs {
    font-size: 1.2em;
}

.car-details-box.text-sm {
    font-size: 1.2em;
}

.car-details-box.text-md {
    font-size: 1.2em;
}

.car-details-box:first-child {
    border-right: 1px solid #e0eaf6;
}

/* Update .filter-result to match .car-card-box styling */
div .filter-result {
    /* Apply car-card-box styling */
    border: 1px solid #aaa;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fff8 0%, #eaffea 100%);
    box-shadow: none;
    transition: box-shadow 0.3s, background 0.3s, border-color 0.3s;
    
    /* Glassy effect */
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    background: linear-gradient(135deg, rgba(248,255,248,0.85) 0%, rgba(234,255,234,0.85) 100%);
    border: 1px solid rgba(170,170,170,0.35);
}

div .filter-result:hover {
    box-shadow: 0 12px 32px rgba(0, 255, 0, 0.12), 0 3px 12px #00FF00;
    background: linear-gradient(135deg, rgba(234,255,234,0.95) 0%, rgba(248,255,248,0.95) 100%);
    border-color: #00FF00;
}



/* Mobile overrides for car-result styles */
@media only screen and (max-width: 768px) {
    .car-model-name {
        font-size: 1.1em;
        line-height: 1.2em;
    }
    .car-year-info {
        font-size: 0.9em;
    }
    .car-details-box {
        font-size: 0.85em !important;
    }
    .car-details-box.text-xs, 
    .car-details-box.text-sm, 
    .car-details-box.text-md {
        font-size: 0.85em;
    }
}

/* Sensor Box Styles */
.sensor-box {
    width: 484px !important;
    max-width: 100%;
}

.sensor-column {
    width: 156px;
    float: left;
}

/* Mobile overrides for sensor box */
@media only screen and (max-width: 768px) {
    .sensor-box {
        width: auto !important;
        height: auto !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .sensor-column {
        width: 48% !important;
        min-width: 140px;
        margin-bottom: 10px;
    }
}
