/* Husqvarna Portal — member-facing Files page (/my-account/files/).
   Uses the site design-system tokens where available, with fallbacks so the
   page still looks right if the theme stylesheet changes. */

.hqp-files {
	--hqp-blue: var(--hw-blue, #273a60);
	--hqp-ink: var(--hw-charcoal, #3d3d3c);
	--hqp-muted: var(--hw-gray-500, #686867);
	--hqp-line: var(--hw-gray-200, #e6e6e6);
	--hqp-surface: var(--hw-gray-100, #f4f4f3);
	--hqp-radius: var(--hw-radius, 16px);
}

.hqp-files-head {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: 20px; flex-wrap: wrap; margin-bottom: 24px;
}
.hqp-files-title { margin: 0 0 4px; }
.hqp-files-sub { margin: 0; color: var(--hqp-muted); font-size: 15px; }

/* Search
   align-items: stretch keeps the button exactly as tall as the input.
   The margin reset matters: Flatsome ships `.button { margin: 0 13px 13px 0 }`,
   and in a centred flex row that bottom margin lifts the button off the
   baseline while the right margin adds a phantom gap. */
.hqp-search { display: flex; gap: 8px; align-items: stretch; }
.hqp-search input[type="search"] {
	border: 1px solid #cfcfce; border-radius: 10px; padding: 10px 14px;
	min-height: 46px; min-width: 220px; font-size: 15px; margin: 0;
	line-height: normal;
}
.hqp-search input[type="search"]:focus {
	border-color: var(--hqp-blue); box-shadow: 0 0 0 3px rgba(39, 58, 96, .15); outline: none;
}
.hqp-search button {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--hqp-blue); color: #fff; border: 0; border-radius: 10px;
	margin: 0; padding: 0 22px; min-height: 46px; font-weight: 700; font-size: 13px;
	line-height: 1; letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
	transition: background .18s ease;
}
.hqp-search button:hover { background: #1c2b49; }

/* List */
.hqp-file-list { list-style: none; margin: 0; padding: 0; }
.hqp-file {
	display: flex; align-items: center; gap: 16px;
	padding: 18px 20px; background: #fff; border: 1px solid var(--hqp-line);
	border-radius: var(--hqp-radius); margin-bottom: 12px;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.hqp-file:hover {
	border-color: #d8d8d7;
	box-shadow: 0 8px 22px rgba(30, 30, 29, .09);
	transform: translateY(-2px);
}

.hqp-file-badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 60px; height: 44px; padding: 0 10px; border-radius: 10px;
	font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	background: #eef0f3; color: var(--hqp-muted); flex-shrink: 0;
}
.hqp-ext-pdf { background: #fdeeee; color: #b91c1c; }
.hqp-ext-doc, .hqp-ext-docx { background: #eef1f7; color: #1d4ed8; }
.hqp-ext-xls, .hqp-ext-xlsx, .hqp-ext-csv { background: #eafaf1; color: #047857; }
.hqp-ext-zip { background: #fdf5e6; color: #b45309; }
.hqp-ext-png, .hqp-ext-jpg, .hqp-ext-jpeg,
.hqp-ext-gif, .hqp-ext-webp, .hqp-ext-svg { background: #f3f1fd; color: #6d28d9; }

.hqp-file-main { flex: 1 1 auto; min-width: 0; }
.hqp-file-name {
	display: block; font-weight: 700; color: var(--hqp-ink);
	font-size: 16px; line-height: 1.35; text-decoration: none;
	overflow-wrap: anywhere;
}
.hqp-file-name:hover { color: var(--hqp-blue); }
.hqp-file-desc { display: block; color: var(--hqp-muted); font-size: 14px; margin-top: 3px; }
.hqp-file-meta { display: block; color: var(--hqp-muted); font-size: 13px; margin-top: 4px; }

.hqp-file-dl {
	flex-shrink: 0; background: var(--hqp-blue); color: #fff !important;
	border-radius: 12px; padding: 11px 22px; font-weight: 700; font-size: 12px;
	letter-spacing: 1px; text-transform: uppercase; text-decoration: none !important;
	transition: background .18s ease, transform .18s ease;
}
.hqp-file-dl:hover { background: #1c2b49; transform: translateY(-1px); }

/* Empty state */
.hqp-empty {
	background: var(--hqp-surface); border-radius: var(--hqp-radius);
	padding: 44px 24px; text-align: center; color: var(--hqp-muted);
}
.hqp-empty p { margin: 0 0 8px; }
.hqp-empty p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
	.hqp-files-head { flex-direction: column; align-items: stretch; }
	.hqp-search input[type="search"] { flex: 1 1 auto; min-width: 0; }
	.hqp-file { flex-wrap: wrap; gap: 12px; padding: 16px; }
	.hqp-file-main { flex: 1 1 100%; order: 2; }
	.hqp-file-badge { order: 1; }
	.hqp-file-dl { order: 3; width: 100%; text-align: center; }
}
