/* =============================================================================
 * FILE 2 OF 3 - STYLESHEET
 * Location: wp-content/plugins/gsg-file-portal/gsg-portal.css
 * All class names are prefixed "gsg-" to avoid clashing with your theme.
 * ========================================================================== */

.gsg-login-wrap,
.gsg-portal-wrap {
	--gsg-primary: #2f5fed;
	--gsg-primary-dark: #2347c4;
	--gsg-bg: #f4f6fb;
	--gsg-card-bg: #f6f7fb;
	--gsg-border: #e3e7f0;
	--gsg-text: #1c2333;
	--gsg-text-muted: #6b7280;
	--gsg-danger: #e0393e;
	--gsg-danger-dark: #c22c31;
	--gsg-success: #1c9e5c;
	--gsg-radius: 12px;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--gsg-text);
}

.gsg-login-wrap *,
.gsg-portal-wrap *,
.gsg-login-wrap *::before,
.gsg-portal-wrap *::before,
.gsg-login-wrap *::after,
.gsg-portal-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Login page ---------- */

.gsg-login-wrap {
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: var(--gsg-bg);
}

.gsg-login-card {
	width: 100%;
	max-width: 400px;
	background: var(--gsg-card-bg);
	border: 1px solid var(--gsg-border);
	border-radius: var(--gsg-radius);
	padding: 36px 32px;
	box-shadow: 0 10px 30px rgba(20, 30, 60, 0.08);
}

.gsg-login-title {
	margin: 0 0 4px;
	font-size: 24px;
	font-weight: 700;
}

.gsg-login-subtitle {
	margin: 0 0 20px;
	color: var(--gsg-text-muted);
	font-size: 14px;
}

.gsg-login-form {
	display: flex;
	flex-direction: column;
}

.gsg-field-label {
	font-size: 13px;
	font-weight: 600;
	margin: 14px 0 6px;
}

.gsg-input {
	width: 100%;
	padding: 11px 14px;
	font-size: 15px;
	border: 1px solid var(--gsg-border);
	border-radius: 8px;
	background: #fbfcfe;
	color: var(--gsg-text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gsg-input:focus {
	outline: none;
	border-color: var(--gsg-primary);
	box-shadow: 0 0 0 3px rgba(47, 95, 237, 0.15);
	background: #fff;
}

.gsg-login-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 16px 0 22px;
	flex-wrap: wrap;
	gap: 8px;
}

.gsg-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--gsg-text-muted);
	cursor: pointer;
}

.gsg-forgot-link {
	font-size: 13px;
	color: var(--gsg-primary);
	text-decoration: none;
}

.gsg-forgot-link:hover {
	text-decoration: underline;
}

/* ---------- Buttons ---------- */

.gsg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 8px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
	white-space: nowrap;
}

.gsg-btn:active {
	transform: translateY(1px);
}

.gsg-btn-primary {
	background: var(--gsg-primary);
	color: #fff;
}

.gsg-btn-primary:hover {
	background: var(--gsg-primary-dark);
}

.gsg-btn-ghost {
	background: transparent;
	border-color: var(--gsg-border);
	color: var(--gsg-text);
}

.gsg-btn-ghost:hover {
	background: #f0f2f8;
}

.gsg-btn-logout {
	background-color: var(--gsg-primary);
	border: 1px solid var(--gsg-primary-dark);
	color: #ffffff !important;
	font-weight: 600;
	padding: 10px 20px;
	box-shadow: 0 2px 10px rgba(47, 95, 237, 0.35);
}

.gsg-btn-logout:hover {
	background-color: var(--gsg-primary-dark);
	box-shadow: 0 3px 14px rgba(47, 95, 237, 0.45);
}

.gsg-btn-logout:visited {
	color: #ffffff !important;
}

.gsg-btn-danger {
	background: #fdeceb;
	color: var(--gsg-danger);
	border-color: #f6c8c6;
}

.gsg-btn-danger:hover {
	background: var(--gsg-danger);
	color: #fff;
}

.gsg-btn-small {
	padding: 6px 12px;
	font-size: 13px;
}

.gsg-btn-block {
	width: 100%;
	padding: 12px 18px;
	font-size: 15px;
	margin-top: 4px;
}

/* ---------- Alerts / toasts ---------- */

.gsg-alert {
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 16px;
}

.gsg-alert-error {
	background: #fdeceb;
	color: var(--gsg-danger-dark);
	border: 1px solid #f6c8c6;
}

.gsg-toast-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: calc(100vw - 40px);
}

.gsg-toast {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	box-shadow: 0 8px 20px rgba(20, 30, 60, 0.18);
	animation: gsg-toast-in 0.2s ease;
	max-width: 340px;
}

.gsg-toast-success {
	background: var(--gsg-success);
}

.gsg-toast-error {
	background: var(--gsg-danger);
}

@keyframes gsg-toast-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- Portal layout ---------- */

.gsg-portal-wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px 16px 64px;
}

.gsg-portal-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
}

.gsg-portal-brand {
	font-size: 20px;
	font-weight: 700;
	color: #ffffff;
}

.gsg-portal-user {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.gsg-portal-user-email {
	font-size: 13px;
	color: var(--gsg-text-muted);
	background: #eef1f8;
	padding: 6px 12px;
	border-radius: 20px;
}

/* ---------- Cards ---------- */

.gsg-card {
	background: var(--gsg-card-bg);
	border: 1px solid var(--gsg-border);
	border-radius: var(--gsg-radius);
	padding: 24px;
	margin-bottom: 20px;
	box-shadow: 0 4px 16px rgba(20, 30, 60, 0.04);
}

.gsg-card-title {
	margin: 0 0 16px;
	font-size: 17px;
	font-weight: 700;
}

/* ---------- Dropzone ---------- */

.gsg-dropzone {
	border: 2px dashed var(--gsg-border);
	border-radius: var(--gsg-radius);
	padding: 32px 20px;
	text-align: center;
	background: #e8f3f7;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.gsg-dropzone.gsg-dropzone-active {
	border-color: var(--gsg-primary);
	background: #eef2ff;
}

.gsg-dropzone-icon {
	font-size: 26px;
	color: var(--gsg-primary);
	margin-bottom: 6px;
}

.gsg-dropzone-text {
	margin: 0 0 12px;
	color: var(--gsg-text-muted);
	font-size: 14px;
}

.gsg-dropzone-hint {
	margin: 14px 0 0;
	font-size: 12px;
	color: var(--gsg-text-muted);
}

.gsg-progress-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
}

.gsg-progress-bar {
	flex: 1;
	height: 8px;
	border-radius: 4px;
	background: #eef1f8;
	overflow: hidden;
}

.gsg-progress-fill {
	height: 100%;
	width: 0%;
	background: var(--gsg-primary);
	transition: width 0.15s ease;
}

.gsg-progress-label {
	font-size: 12px;
	color: var(--gsg-text-muted);
	min-width: 36px;
	text-align: right;
}

/* ---------- Files table ---------- */

.gsg-files-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.gsg-files-header .gsg-card-title {
	margin: 0;
}

.gsg-search-input {
	max-width: 280px;
}

.gsg-table-scroll {
	overflow-x: auto;
	overflow-y: hidden;
	border: 1px solid var(--gsg-border);
	border-radius: 14px;
	background: var(--gsg-card-bg);
}

.gsg-file-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
}

.gsg-file-table thead th {
	text-align: left;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	font-weight: 700;
	color: var(--gsg-text-muted);
	padding: 13px 14px;
	white-space: nowrap;
	background: linear-gradient(180deg, #f7f9ff 0%, #eef2fd 100%);
	border-bottom: 1px solid var(--gsg-border);
	position: relative;
}

.gsg-file-table thead tr::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: linear-gradient(90deg, var(--gsg-primary) 0%, rgba(47, 95, 237, 0.15) 65%, transparent 100%);
}

.gsg-file-table thead th:first-child {
	border-top-left-radius: 13px;
}

.gsg-file-table thead th:last-child {
	border-top-right-radius: 13px;
}

.gsg-file-table tbody td {
	padding: 13px 14px;
	border-bottom: 1px solid var(--gsg-border);
	vertical-align: middle;
	transition: background-color 0.15s ease;
}

.gsg-file-table tbody tr {
	position: relative;
	transition: box-shadow 0.15s ease;
}

.gsg-file-table tbody tr:last-child td {
	border-bottom: none;
}

.gsg-file-table tbody tr:hover td {
	background: rgba(47, 95, 237, 0.045);
}

.gsg-file-table tbody tr::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	background: var(--gsg-primary);
	transition: width 0.15s ease;
}

.gsg-file-table tbody tr:hover::before {
	width: 3px;
}

.gsg-file-cell {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 180px;
}

.gsg-file-icon {
	font-size: 18px;
}

.gsg-file-name {
	word-break: break-word;
}

.gsg-mono-cell {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	color: var(--gsg-text-muted);
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.gsg-actions-cell {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.gsg-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 11px;
	border-radius: 20px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.gsg-badge::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex-shrink: 0;
}

.gsg-badge-shared {
	background: #e7f7ee;
	color: var(--gsg-success);
}

.gsg-badge-shared::before {
	background: var(--gsg-success);
	box-shadow: 0 0 0 3px rgba(28, 158, 92, 0.18);
}

.gsg-badge-private {
	background: #eef1f8;
	color: var(--gsg-text-muted);
}

.gsg-badge-private::before {
	background: var(--gsg-text-muted);
	box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.15);
}

.gsg-empty-row td {
	border-bottom: none;
}

.gsg-empty-state {
	text-align: center;
	padding: 40px 16px;
	color: var(--gsg-text-muted);
}

.gsg-empty-icon {
	font-size: 36px;
	margin-bottom: 8px;
}

.gsg-hidden-row {
	display: none !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
	.gsg-login-card {
		padding: 28px 20px;
	}

	.gsg-card {
		padding: 18px;
	}

	.gsg-file-table thead {
		display: none;
	}

	.gsg-file-table,
	.gsg-file-table tbody,
	.gsg-file-table tr,
	.gsg-file-table td {
		display: block;
		width: 100%;
	}

	.gsg-file-table tr {
		border: 1px solid var(--gsg-border);
		border-radius: 10px;
		margin-bottom: 12px;
		padding: 8px 4px;
	}

	.gsg-file-table td {
		border-bottom: none;
		padding: 6px 12px;
	}

	.gsg-file-table td:before {
		content: attr(data-label);
		display: block;
		font-size: 11px;
		text-transform: uppercase;
		color: var(--gsg-text-muted);
		margin-bottom: 2px;
	}

	.gsg-search-input {
		max-width: 100%;
		width: 100%;
	}
}
