/* phpBB Garage legacy MOD integration for proflat/phpBB 3.3
   Local-only compatibility layer: keeps old Garage templates usable in proflat. */

.section-garage #page-body,
.section-garage_vehicle #page-body,
.section-garage_modification #page-body,
.section-garage_quartermile #page-body,
.section-garage_dynorun #page-body,
.section-garage_track #page-body,
.section-garage_blog #page-body,
.section-garage_guestbook #page-body,
.section-garage_service #page-body,
.section-garage_premium #page-body {
	clear: both;
}

#garage {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.45;
}

/* Keep the legacy "latest updated" Garage menu at the bottom of Garage pages. */
#garage > .panel.bg3 > .inner > div[style] {
	display: flex;
	flex-direction: column;
}

#garage *,
#garage *::before,
#garage *::after {
	box-sizing: border-box;
}

#garage .panel {
	border-radius: 3px;
	border: 1px solid #d7d7d7;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
	margin-bottom: 10px;
}

#garage .inner {
	padding: 10px;
}

#garage span.corners-top,
#garage span.corners-bottom,
#garage span.corners-top span,
#garage span.corners-bottom span {
	display: none !important;
}

/* Main Garage tabs: scoped so proflat's normal tabs are not affected. */
#garage > #tabs {
	margin: 0 0 10px;
	padding: 0;
	min-height: 0;
}

#garage > #tabs ul,
#garage #gtabs ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

#garage > #tabs li,
#garage #gtabs li {
	display: block;
	margin: 0;
	padding: 0;
}

#garage > #tabs a,
#garage #gtabs a {
	display: block;
	padding: 10px 14px;
	border-radius: 4px;
	background: #f2f4f7;
	border: 1px solid #d6dbe1;
	color: #555;
	font-size: 14px;
	line-height: 1.25;
	font-weight: 700;
	text-decoration: none;
}

#garage > #tabs li.activetab a,
#garage #gtabs li.activetab a,
#garage > #tabs a:hover,
#garage #gtabs a:hover {
	background: #e85a4f;
	border-color: #e85a4f;
	color: #fff;
}

#garage > #tabs li.garage-action-tab a {
	background: #2f8f46;
	border-color: #2f8f46;
	color: #fff;
}

#garage .tabbg {
	background: none !important;
	padding: 0;
}

/* Side menu + main content */
#garage-toggle {
	display: none;
}

#garage-toggle-handle {
	display: none;
}

#garage-menu {
	float: none;
	order: 2;
	width: 100%;
	margin: 10px 0 0 0;
}

#garage-main {
	float: none;
	clear: both;
	order: 1;
	width: 100%;
	margin-bottom: 10px;
}

#garage::after,
#garage .panel::after,
#garage .inner::after,
#garage .forabg::after,
#garage ul.garage_list::after,
#garage ul.topiclist::after {
	content: "";
	display: block;
	clear: both;
}

#garage-menu .panel,
#garage-menu .vehicles-mini,
#garage-latest-updated {
	background: #f7f7f7;
	border: 1px solid #d7d7d7;
	border-radius: 3px;
	margin: 0 0 10px 0;
}

#garage-latest-updated {
	clear: both;
	order: 3;
	width: 100%;
	margin-top: 18px;
}

#garage-latest-updated h3 {
	font-size: 18px;
	line-height: 1.3;
}

#garage-latest-updated .index_block,
#garage-latest-updated .index_block_header {
	font-size: 14px;
	line-height: 1.4;
}

#garage-menu .vehicles-mini .inner,
#garage-latest-updated .inner {
	padding: 10px;
}

#garage-menu .panel h3,
#garage-menu .vehicles-mini h3,
#garage-latest-updated h3,
#garage-main h3 {
	margin-top: 0;
	padding-bottom: 6px;
	border-bottom: 1px solid #e2e2e2;
	font-size: 1.2em;
}

#garage-menu dl,
#garage-latest-updated dl {
	margin: 0;
}

#garage-menu dl.mini,
#garage-latest-updated dl.mini {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 8px;
}

#garage-menu dt,
#garage-latest-updated dt {
	font-weight: 700;
	margin-bottom: 4px;
}

#garage-menu dd,
#garage-latest-updated dd {
	margin: 0;
	line-height: 1.35;
}

#garage-menu dl.mini dd,
#garage-latest-updated dl.mini dd {
	padding: 8px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 3px;
}

/* Old Garage list/table layout helpers */
#garage ul.garage_list,
#garage ul.topiclist {
	list-style: none;
	margin: 0;
	padding: 0;
}

#garage ul.garage_list {
	min-width: 860px;
}

#garage ul.garage_list li,
#garage ul.topiclist li.row {
	clear: both;
	padding: 8px 10px;
	border-top: 1px solid #e6e6e6;
}

#garage ul.garage_list dl {
	display: flex;
	align-items: stretch;
	gap: 0;
	margin: 0;
	width: 100%;
}

#garage ul.garage_list dt.gcamera_image {
	float: none;
	flex: 0 0 34px;
	width: 34px;
	padding: 6px 4px;
	margin: 0;
}

#garage ul.garage_list [class*="gwidth-"] {
	float: none;
	flex-shrink: 1;
	min-width: 0;
	word-break: normal;
	overflow-wrap: anywhere;
}

#garage ul.garage_list li:first-child,
#garage ul.topiclist li.row:first-child {
	border-top: 0;
}

#garage .forabg {
	background: #f7f7f7;
	border: 1px solid #d7d7d7;
	border-radius: 3px;
	margin-bottom: 10px;
	padding: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

#garage .forabg .header {
	background: #4b4f54;
	color: #fff;
	font-weight: 700;
	border-radius: 3px 3px 0 0;
}

#garage .forabg .header a,
#garage .forabg .header dt,
#garage .forabg .header dd {
	color: #fff;
}

#garage .bg1,
#garage .row1 {
	background-color: #fbfbfb;
}

#garage .bg2 {
	background-color: #f2f2f2;
}

#garage .bg3 {
	background-color: #fff;
}

#garage dt,
#garage dd {
	min-height: 1px;
}

#garage dt.index_block_header,
#garage dd.index_block_header,
#garage dt.index_block,
#garage dd.index_block {
	float: left;
	width: 33.333%;
	text-align: center;
	padding: 8px 10px;
	margin: 0;
	font-size: 14px;
}

#garage .gwidth-5 { width: 5%; }
#garage .gwidth-7 { width: 7%; }
#garage .gwidth-8 { width: 8%; }
#garage .gwidth-10 { width: 10%; }
#garage .gwidth-12 { width: 12%; }
#garage .gwidth-14 { width: 14%; }
#garage .gwidth-15 { width: 15%; }
#garage .gwidth-16 { width: 16%; }
#garage .gwidth-20 { width: 20%; }
#garage .gwidth-25 { width: 25%; }
#garage .gwidth-30 { width: 30%; }
#garage .gwidth-40 { width: 40%; }
#garage .gwidth-50 { width: 50%; }
#garage .gwidth-60 { width: 60%; }
#garage .gwidth-70 { width: 70%; }
#garage .gwidth-80 { width: 80%; }

#garage [class*="gwidth-"] {
	float: left;
	padding: 7px 8px;
	margin: 0;
}

#garage ul.garage_list li.header [class*="gwidth-"],
#garage ul.garage_list li.header .gcamera_image {
	font-size: 13px;
	line-height: 1.25;
	font-weight: 700;
	text-transform: none;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}

#garage .garage-image-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-start;
	margin: 8px 0;
}

#garage .garage-image-gallery a,
#garage .gcamera_image {
	display: inline-block;
	padding: 4px;
	background: #fff;
	border: 1px solid #d7d7d7;
	border-radius: 3px;
}

#garage ul.garage_list .gcamera_image {
	background: transparent;
	border: 0;
	border-radius: 0;
}

#garage .garage-image-gallery img,
#garage .gcamera_image img,
#garage img {
	max-width: 100%;
	height: auto;
}

#garage .garage-camera-icon,
#garage .garage-edit-icon,
#garage .garage-delete-icon {
	display: inline-block;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	background-repeat: no-repeat;
	background-position: 50% 50%;
}

#garage .garage-camera-icon { background-image: url("./images/garage_camera.gif"); }
#garage .garage-edit-icon { background-image: url("./images/garage_edit.gif"); }
#garage .garage-delete-icon { background-image: url("./images/garage_delete.gif"); }

.icon-garage {
	background-image: url("./images/icon_garage.gif");
	background-repeat: no-repeat;
	background-position: 0 50%;
	padding-left: 18px;
}

#garage .submit-buttons,
#garage .display-options {
	clear: both;
	padding: 10px 0;
	text-align: center;
}

#garage ul.manage-vehicle-icons {
	display: flex !important;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	margin: 8px 0 12px;
	list-style: none;
}

#garage ul.manage-vehicle-icons li {
	float: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	background: none !important;
}

#garage ul.manage-vehicle-icons li a {
	display: block !important;
	width: auto !important;
	height: auto !important;
	padding: 7px 10px;
	border-radius: 4px;
	background: #f2f4f7 !important;
	border: 1px solid #d6dbe1;
	color: #444;
	font-weight: 700;
	text-decoration: none;
}

#garage ul.manage-vehicle-icons li a:hover {
	background: #e85a4f !important;
	border-color: #e85a4f;
	color: #fff;
}

#garage ul.manage-vehicle-icons li span {
	display: inline !important;
}

#garage input.inputbox,
#garage select,
#garage textarea {
	max-width: 100%;
}

#garage .pagination {
	margin: 8px 0;
}

#garage-copyright {
	clear: both;
	padding: 10px 0;
	font-size: .85em;
	text-align: center;
	color: #888;
}

@media (max-width: 900px) {
	#garage-toggle,
	#garage-menu,
	#garage-main {
		float: none;
		width: 100% !important;
		margin-right: 0;
	}

	#garage-toggle {
		display: none;
	}
}

@media (max-width: 650px) {
	#garage [class*="gwidth-"],
	#garage dt.index_block_header,
	#garage dd.index_block_header,
	#garage dt.index_block,
	#garage dd.index_block {
		float: none;
		width: 100% !important;
		text-align: left;
	}

	#garage ul.garage_list [class*="gwidth-"] {
		width: auto !important;
		text-align: inherit;
	}

	#garage > #tabs a,
	#garage #gtabs a {
		padding: 9px 11px;
		font-size: 13px;
	}
}
