/* ==========================================================================
   Circles UK Members Area — Front-end file browser
   ========================================================================== */

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

.cuk-card {
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	padding: 32px;
	max-width: 460px;
	margin: 0 auto;
}

.cuk-card__title {
	margin: 0 0 24px;
	padding: 0 0 16px;
	border-bottom: 1px solid #dee2e6;
	font-size: 1.2em;
	font-weight: 600;
	color: #1d2327;
}

/* --------------------------------------------------------------------------
   Form fields
   -------------------------------------------------------------------------- */

.cuk-field {
	margin: 0 0 18px;
	padding: 0;
}

.cuk-field label {
	display: block;
	margin-bottom: 5px;
	font-size: 0.9em;
	font-weight: 600;
	color: #495057;
}

.cuk-field input[type="text"],
.cuk-field input[type="email"],
.cuk-field input[type="password"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #ced4da;
	border-radius: 4px;
	font-size: 1em;
	font-family: inherit;
	color: #1d2327;
	background: #fff;
	transition: border-color 0.15s;
}

.cuk-field input[type="text"]:focus,
.cuk-field input[type="email"]:focus,
.cuk-field input[type="password"]:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.cuk-readonly-value {
	display: block;
	padding: 8px 0;
	color: #6c757d;
	font-size: 1em;
}

.cuk-field--actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Button
   -------------------------------------------------------------------------- */

.cuk-btn {
	display: inline-block;
	padding: 8px 20px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.95em;
	font-family: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s;
}

.cuk-btn:hover {
	background: #135e96;
	color: #fff;
}

/* --------------------------------------------------------------------------
   Form feedback messages
   -------------------------------------------------------------------------- */

.cuk-form-error,
.cuk-form-message {
	padding: 10px 14px;
	border-radius: 4px;
	margin-bottom: 18px;
	font-size: 0.9em;
}

.cuk-form-error {
	background: #fde8e8;
	border: 1px solid #f5c6c6;
	color: #c0392b;
}

.cuk-form-message {
	background: #e6f4ea;
	border: 1px solid #b7dfbe;
	color: #1e7e34;
}

.cuk-forgot-link {
	font-size: 0.875em;
	color: #6c757d;
}

.cuk-forgot-link:hover {
	color: #2271b1;
}

/* --------------------------------------------------------------------------
   Honeypot field — visually hidden from humans, visible to bots
   -------------------------------------------------------------------------- */

.cuk-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

/* --------------------------------------------------------------------------
   Logout bar
   -------------------------------------------------------------------------- */

.cuk-logout-bar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 16px;
}

.cuk-logout-link {
	font-size: 0.875em;
	color: #6c757d;
	text-decoration: none;
	border: 1px solid #dee2e6;
	border-radius: 3px;
	padding: 4px 10px;
	transition: color 0.1s, border-color 0.1s;
}

.cuk-logout-link:hover {
	color: #c0392b;
	border-color: #c0392b;
}

/* --------------------------------------------------------------------------
   Browser wrapper
   -------------------------------------------------------------------------- */

.cuk-file-browser {
	font-size: 1rem;
	line-height: 1.5;
}

.cuk-no-files {
	color: #6c757d;
}

/* --------------------------------------------------------------------------
   Category toggle button
   -------------------------------------------------------------------------- */

.cuk-category-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	background: none;
	border: none;
	padding: 6px 0;
	cursor: pointer;
	text-align: left;
	color: inherit;
	font-family: inherit;
}

.cuk-category-toggle:hover .cuk-category-name {
	text-decoration: underline;
}

/* Rotating chevron */
.cuk-toggle-icon {
	flex-shrink: 0;
	display: inline-block;
	width: 0;
	height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 8px solid currentColor;
	transition: transform 0.15s ease;
	opacity: 0.6;
}

.cuk-category-toggle[aria-expanded="true"] .cuk-toggle-icon {
	transform: rotate(90deg);
}

/* Category name — size scales with depth */
.cuk-depth-0 > .cuk-category-toggle .cuk-category-name {
	font-size: 1.1em;
	font-weight: 600;
}

.cuk-depth-1 > .cuk-category-toggle .cuk-category-name {
	font-size: 1em;
	font-weight: 600;
}

.cuk-depth-2 > .cuk-category-toggle .cuk-category-name {
	font-size: 0.95em;
	font-weight: 500;
}

.cuk-category-count {
	font-size: 0.85em;
	color: #6c757d;
	font-weight: 400;
}

/* --------------------------------------------------------------------------
   Category contents + hierarchy indentation
   -------------------------------------------------------------------------- */

.cuk-category-contents {
	margin-top: 2px;
}

/* Indent children and draw the vertical connector line */
.cuk-depth-0 > .cuk-category-contents {
	padding-left: 20px;
	border-left: 2px solid #dee2e6;
	margin-left: 3px;
	margin-bottom: 8px;
}

.cuk-depth-1 > .cuk-category-contents {
	padding-left: 20px;
	border-left: 2px solid #e9ecef;
	margin-left: 3px;
	margin-bottom: 4px;
}

.cuk-depth-2 > .cuk-category-contents {
	padding-left: 16px;
	border-left: 2px solid #f1f3f4;
	margin-left: 3px;
}

/* Separator between top-level categories */
.cuk-depth-0 {
	margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   File list
   -------------------------------------------------------------------------- */

.cuk-file-list {
	list-style: none;
	margin: 4px 0 8px;
	padding: 0;
}

.cuk-file-item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 5px 0;
	border-bottom: 1px solid #f1f3f4;
}

.cuk-file-item:last-child {
	border-bottom: none;
}

.cuk-file-link {
	display: flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	flex: 1 1 auto;
	min-width: 0;
}

.cuk-file-link:hover .cuk-file-name {
	text-decoration: underline;
}

.cuk-file-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* File type badge */
.cuk-file-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	font-size: 0.8em;
	color: #6c757d;
}

.cuk-file-type {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 3px;
	font-weight: 600;
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	background: #e9ecef;
	color: #495057;
}

.cuk-file-type--pdf    { background: #fde8e8; color: #c0392b; }
.cuk-file-type--word   { background: #e8f0fe; color: #1a56b8; }
.cuk-file-type--excel  { background: #e6f4ea; color: #1e7e34; }
.cuk-file-type--powerpoint { background: #fff3e0; color: #c45000; }
.cuk-file-type--zip    { background: #f3e8ff; color: #6f42c1; }
.cuk-file-type--text   { background: #f1f3f4; color: #5f6368; }
