/**
 * Pilot Details Element Styles
 * 
 * Styling for the pilot details page including header,
 * cards, badges, and statistics layout
 */

.vamsys-pilot-details {
	padding: 20px 0;
}

/* Loading and Error States */
.pilot-details-loading {
	text-align: center;
	padding: 40px 20px;
}

.pilot-details-error {
	margin-bottom: 20px;
}

/* Pilot Header Section */
.pilot-header-card {
	overflow: hidden;
	border: 1px solid #e5e7eb;
}

.pilot-header-photo {
	background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
	position: relative;
}

.pilot-photo-container {
	width: 220px;
	height: 100%;
	min-height: 280px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px;
}

.pilot-photo-placeholder {
	width: 160px;
	height: 160px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	border: 4px solid rgba(255, 255, 255, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(10px);
}

.pilot-initials {
	font-size: 56px;
	font-weight: 700;
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.pilot-header-top {
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 20px;
}

.pilot-name {
	font-size: 28px;
	font-weight: 600;
	color: #111827;
	margin: 0;
}

.pilot-rank {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #6b7280;
}

.pilot-rank img {
	height: 22px;
	width: auto;
	display: inline-block;
}

.pilot-username {
	color: #9ca3af;
	font-size: 14px;
	font-weight: 500;
}

.pilot-status-badge .uk-label {
	font-size: 12px;
	font-weight: 600;
	padding: 6px 16px;
	border-radius: 20px;
}

/* Info Grid */
.pilot-info-grid {
	margin-top: 24px;
}

.pilot-info-item {
	padding: 8px 0;
}

.info-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #9ca3af;
	margin-bottom: 4px;
}

.info-value {
	font-size: 15px;
	font-weight: 500;
	color: #111827;
	word-break: break-word;
}

.info-sub {
	margin-top: 2px;
	font-size: 12px;
}

.pilot-stat-item .info-value {
	font-size: 20px;
	font-weight: 700;
}

.pilot-airline {
	gap: 8px;
}

.pilot-airline-logo {
	max-width: 40px;
	height: auto;
	object-fit: contain;
}

/* Badges in header */
.pilot-badges-section {
	padding-top: 20px;
	border-top: 1px solid #e5e7eb;
}

.pilot-badges {
	min-height: 40px;
}

/* Responsive adjustments */
@media (max-width: 959px) {
	.pilot-photo-container {
		width: 100%;
		min-height: 200px;
	}
	
	.pilot-photo-placeholder {
		width: 120px;
		height: 120px;
	}
	
	.pilot-initials {
		font-size: 42px;
	}
	
	.pilot-name {
		font-size: 24px;
	}
}

/* Details Grid */
.pilot-details-grid {
	margin-top: 30px;
}

.pilot-details-grid .uk-card {
	border: 1px solid #e5eaf7;
	border-radius: 8px;
}

.pilot-details-grid .uk-card-title {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 20px;
	color: #1f2937;
	border-bottom: 2px solid #d9e0f0;
	padding-bottom: 15px;
}

.uk-list-item {
	padding: 12px 0;
}

.uk-list-item:first-child {
	padding-top: 0;
}

.uk-list-item:last-child {
	padding-bottom: 0;
	border: none;
}

.uk-list-divider > .uk-list-item:not(:last-child) {
	border-bottom: 1px solid #e5eaf7;
}

.uk-list-item .uk-text-muted {
	font-size: 11px;
	letter-spacing: 0.5px;
	font-weight: 500;
	margin-bottom: 5px;
}

.uk-list-item .uk-text-emphasis {
	font-size: 14px;
	color: #1f2937;
	font-weight: 500;
}

/* Badges */
.pilot-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.pilot-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 10px;
	border-radius: 6px;
	background-color: #f9fafb;
	border: 1px solid #e5eaf7;
	transition: all 0.2s ease;
}

.pilot-badge:hover {
	background-color: #f3f4f6;
	border-color: #d9e0f0;
}

.pilot-badge img {
	height: 40px;
	width: 40px;
	object-fit: contain;
	margin-bottom: 5px;
}

.pilot-badge-image {
	display: block;
}

.pilot-badge-placeholder {
	height: 40px;
	width: 40px;
	background-color: #e5eaf7;
	border-radius: 4px;
	margin-bottom: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pilot-badge-name {
	font-size: 12px;
	color: #374151;
	font-weight: 500;
}

.pilot-badge-date {
	font-size: 10px;
	color: #9ca3af;
	margin-top: 3px;
}

/* Statistics Section */
.pilot-details-grid .uk-card:nth-child(n+3) .uk-card-title {
	border-color: #d9e0f0;
}

#pilot-detailed-stats {
	margin-top: 0;
}

#pilot-detailed-stats h4 {
	font-size: 20px;
	font-weight: 600;
	color: #111827;
	margin-bottom: 30px;
}

#pilot-detailed-stats .uk-grid-small {
	margin-left: 0px;
}

#pilot-detailed-stats h5 {
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 16px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e5e7eb;
}

/* Stat Card Wrapper */
.stat-card-wrapper {
	background: linear-gradient(135deg, rgba(0, 161, 222, 0.03) 0%, rgba(140, 198, 63, 0.03) 100%);
	border: 1px solid rgba(0, 161, 222, 0.15);
	border-radius: 8px;
	padding: 16px;
	transition: all 0.2s ease;
}

.stat-card-wrapper:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 161, 222, 0.08);
	border-color: rgba(0, 161, 222, 0.25);
}

/* Stats Grid Containers */
#pilot-stats-flight-time-content,
#pilot-stats-points-content,
#pilot-stats-transport-content {
	margin-left: -4px;
	margin-right: -4px;
}

#pilot-stats-flight-time-content > div,
#pilot-stats-points-content > div,
#pilot-stats-transport-content > div {
	padding: 4px;
}

.stat-period-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #00719e;
	margin-bottom: 8px;
}

.stat-value {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	line-height: 1;
}

#pilot-stats-flight-time-content .stat-value,
#pilot-stats-points-content .stat-value {
	font-size: 20px;
}

.stat-label {
	font-size: 12px;
	font-weight: 600;
	color: #00719e;
	margin-top: 8px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.stat-breakdown {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(0, 161, 222, 0.15);
	font-size: 11px;
	color: #00719e;
	display: flex;
	justify-content: space-between;
}

/* PIREPs Stats Table */
#pilot-stats-pireps-content .uk-table {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e5e7eb;
}

.period-cell {
	font-weight: 600;
	color: #111827;
}

.stat-number {
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.stat-highlight {
	color: #059669;
	font-weight: 600;
}

.stat-warning {
	color: #dc2626;
	font-weight: 600;
}

/* Stat Section Spacing */
.uk-margin-medium-top {
	margin-top: 40px !important;
}

#pilot-detailed-stats > div:first-child {
	margin-top: 0;
}

/* Empty State */
.stats-empty-state {
	text-align: center;
	padding: 40px 20px;
	color: #9ca3af;
	font-size: 14px;
}

.uk-grid-small > [class*='uk-child-width'] > div {
	display: flex;
	flex-direction: column;
}

.uk-text-muted {
	font-size: 11px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	font-weight: 500;
	color: #9ca3af;
}

/* PIREPs List Section */
.pilot-pireps-list {
	margin-top: 10px;
}

.pilot-pirep-item {
	padding: 15px;
	border: 1px solid #e5eaf7;
	border-radius: 4px;
	margin-bottom: 10px;
	transition: all 0.2s ease;
	background-color: #f9fafb;
}

.pilot-pirep-item:hover {
	background-color: #f3f4f6;
	border-color: #d9e0f0;
}

.pilot-pirep-item:last-child {
	margin-bottom: 0;
}

.pilot-pirep-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	gap: 10px;
}

.pilot-pirep-route {
	font-weight: 600;
	color: #1f2937;
	font-size: 15px;
	flex: 1;
}

.pilot-pirep-status {
	font-size: 11px;
	white-space: nowrap;
	padding: 4px 8px;
}

.pilot-pirep-subheader {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	font-size: 12px;
	gap: 10px;
}

.pilot-pirep-date {
	font-size: 12px;
	color: #9ca3af;
}

.pilot-pirep-callsign {
	font-size: 12px;
	color: #6b7280;
	font-weight: 500;
}

.pilot-pirep-details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 15px;
	font-size: 13px;
}

.pilot-pirep-detail {
	display: flex;
	flex-direction: column;
}

.pilot-pirep-detail-label {
	font-size: 10px;
	text-transform: uppercase;
	color: #9ca3af;
	margin-bottom: 3px;
	font-weight: 500;
}

.pilot-pirep-detail-value {
	color: #374151;
	font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
	.pilot-header .uk-grid {
		gap: 20px;
	}
	
	.pilot-badges {
		gap: 8px;
	}
	
	.pilot-badge {
		padding: 8px;
	}
	
	.pilot-badge img {
		height: 35px;
		width: 35px;
	}
	
	.pilot-pirep-details {
		grid-template-columns: repeat(2, 1fr);
	}
}
