/**
 * Registrering v2: Stilar för /registration/ (steg 1) och /registration/?step=preview (förhandsgranskning).
 * Uppdaterad design – kort, knappar, dropzone och modal i linje med resten av sidan.
 */

/* ========== Bas: knappar (så sidan ser bra ut även utan style-new-dinsida) ========== */
.reg-v2-wrapper .normal-button,
.reg-v2-wrapper .small-button {
	display: inline-block;
	padding: 12px 20px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
	box-sizing: border-box;
	text-decoration: none;
	text-align: center;
}

.reg-v2-wrapper .normal-button:hover,
.reg-v2-wrapper .small-button:hover {
	transform: translateY(-1px);
}

.reg-v2-wrapper .button-block {
	display: block;
	width: 100%;
}

.reg-v2-wrapper .button-blue,
.reg-v2-wrapper .blue-button {
	background: #0056b3;
	color: #fff;
}

.reg-v2-wrapper .button-blue:hover,
.reg-v2-wrapper .blue-button:hover {
	background: #004494;
	color: #fff;
}

.reg-v2-wrapper .green-button {
	background: #198754;
	color: #fff;
}

.reg-v2-wrapper .green-button:hover {
	background: #157347;
	color: #fff;
}

.reg-v2-wrapper .small-button {
	padding: 8px 16px;
	font-size: 0.9rem;
}

/* ========== Sida A: Uppladdning ========== */
.reg-v2-wrapper {
	max-width: 520px;
	margin: 2rem auto;
	padding: 2rem 1.5rem;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.reg-v2-title {
	text-align: center;
	margin: 0 0 0.5rem 0;
	font-size: 1.75rem;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

.reg-v2-intro {
	text-align: center;
	margin-bottom: 1.75rem;
	color: #555;
	font-size: 1rem;
	line-height: 1.5;
}

.reg-v2-buttons {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.reg-v2-buttons .reg-v2-btn {
	width: 100%;
	padding: 14px 20px;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}

.reg-v2-buttons .reg-v2-btn:hover {
	transform: translateY(-1px);
}

.reg-v2-buttons .reg-v2-btn-upload {
	background: #0056b3;
	color: #fff;
}

.reg-v2-buttons .reg-v2-btn-upload:hover {
	background: #004494;
	color: #fff;
}

.reg-v2-buttons .reg-v2-btn-manual {
	background: #198754;
	color: #fff;
}

.reg-v2-buttons .reg-v2-btn-manual:hover {
	background: #157347;
	color: #fff;
}

.reg-v2-upload-flow,
.reg-v2-manual-flow {
	display: none;
}

.reg-v2-upload-flow .reg-v2-upload-step,
.reg-v2-upload-loading,
.reg-v2-upload-error {
	display: none;
}

.reg-v2-back {
	display: inline-flex;
	align-items: center;
	margin-bottom: 1.25rem;
	padding: 8px 16px;
	font-size: 0.9rem;
	color: #555;
	background: #f5f5f5;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	text-decoration: none;
}

.reg-v2-back:hover {
	background: #eee;
	color: #333;
}

.reg-v2-hint {
	margin: 0 0 1rem 0;
	font-size: 0.9rem;
	color: #666;
	text-align: center;
}

/* Dropzone */
.reg-v2-dropzone.choice-card-upload {
	display: block;
	min-height: 160px;
	padding: 2rem;
	text-align: center;
	cursor: pointer;
	background: #fafbfc;
	border: 2px dashed #c8d0d9;
	border-radius: 12px;
	transition: border-color 0.2s, background 0.2s;
}

.reg-v2-dropzone.choice-card-upload:hover,
.reg-v2-dropzone.choice-card-upload.reg-v2-dragover {
	border-color: #0056b3;
	background: #f0f7ff;
}

.reg-v2-file-input {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
	pointer-events: none;
}

.reg-v2-dropzone-text {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	line-height: 1.5;
}

.reg-v2-upload-error {
	color: #c00;
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	background: #fff5f5;
	border: 1px solid #fcc;
	border-radius: 8px;
	font-size: 0.9rem;
}

/* Loading state */
.reg-v2-upload-loading {
	text-align: center;
	padding: 2rem;
}

.reg-v2-upload-loading p {
	margin: 0 0 1rem 0;
	font-size: 1rem;
	color: #555;
}

.reg-v2-upload-loading .lds-ellipsis {
	display: block;
	position: relative;
	width: 85px;
	height: 25px;
	margin: 0 auto;
}

.reg-v2-upload-loading .lds-ellipsis div {
	position: absolute;
	top: 8px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #0056b3;
	animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.reg-v2-upload-loading .lds-ellipsis div:nth-child(1) {
	left: 10px;
	animation: reg-v2-ellipsis1 0.6s infinite;
}

.reg-v2-upload-loading .lds-ellipsis div:nth-child(2) {
	left: 12px;
	animation: reg-v2-ellipsis2 0.6s infinite;
}

.reg-v2-upload-loading .lds-ellipsis div:nth-child(3) {
	left: 40px;
	animation: reg-v2-ellipsis2 0.6s infinite;
}

.reg-v2-upload-loading .lds-ellipsis div:nth-child(4) {
	left: 64px;
	animation: reg-v2-ellipsis3 0.6s infinite;
}

@keyframes reg-v2-ellipsis1 {
	0% { transform: scale(0); }
	100% { transform: scale(1); }
}

@keyframes reg-v2-ellipsis3 {
	0% { transform: scale(1); }
	100% { transform: scale(0); }
}

@keyframes reg-v2-ellipsis2 {
	0% { transform: translate(0, 0); }
	100% { transform: translate(24px, 0); }
}

/* ========== Sida B: Preview ========== */
.reg-v2-preview-wrapper {
	max-width: 900px;
	margin: 0 auto;
	padding: 1.5rem;
}

.reg-v2-preview-bar {
	background: #fff;
	padding: 2rem;
	margin-bottom: 1.5rem;
	border-radius: 12px;
	text-align: center;
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.reg-v2-preview-bar .reg-v2-preview-bar-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a1a1a;
}

.reg-v2-preview-bar .reg-v2-preview-bar-text {
	margin: 0 0 1.25rem 0;
	color: #555;
	line-height: 1.5;
	max-width: 36em;
	margin-left: auto;
	margin-right: auto;
}

.reg-v2-preview-bar-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

.reg-v2-preview-sections {
	display: none;
}

.reg-v2-preview-cta {
	display: inline-block;
	padding: 14px 28px;
	font-size: 1.05rem;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	background: #198754;
	color: #fff;
	transition: background 0.2s, transform 0.1s;
}

.reg-v2-preview-cta:hover {
	background: #157347;
	color: #fff;
	transform: translateY(-1px);
}

.reg-v2-preview-secondary {
	display: block;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	color: #0056b3;
	text-decoration: none;
	transition: color 0.2s;
}

.reg-v2-preview-secondary:hover {
	color: #004494;
}

.reg-v2-preview-contact-box {
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	background: #fafbfc;
}

.reg-v2-preview-contact-box p {
	margin: 0.25rem 0;
}

.reg-v2-preview-section {
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.reg-v2-preview-section-title {
	margin: 0 0 1rem 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: #333;
	border-bottom: 2px solid #e8e8e8;
	padding-bottom: 0.5rem;
}

.reg-v2-preview-item {
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #eee;
}

.reg-v2-preview-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.reg-v2-preview-item-header {
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #333;
}

.reg-v2-preview-item-description {
	color: #444;
	line-height: 1.5;
}

/* ========== Modal ========== */
.reg-v2-register-popup {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	overflow: auto;
}

.reg-v2-register-popup.is-open {
	display: block;
}

.reg-v2-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1;
	backdrop-filter: blur(2px);
}

.reg-v2-modal-box {
	position: relative;
	z-index: 2;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
}

.reg-v2-modal-inner {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	max-width: 480px;
	width: 100%;
	max-height: calc(100vh - 3rem);
	overflow-y: auto;
	padding: 2rem;
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.reg-v2-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.reg-v2-popup-title {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 700;
	flex: 1;
	color: #1a1a1a;
}

/* Formulär i modal */
.reg-v2-form .reg-v2-field {
	margin-bottom: 1.25rem;
}

.reg-v2-form .edit-cv-input,
.reg-v2-form .reg-v2-input,
.reg-v2-form input[type="email"],
.reg-v2-form input[type="password"],
.reg-v2-form input[type="text"] {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	line-height: 1.4;
	color: #333;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.reg-v2-form .edit-cv-input:focus,
.reg-v2-form .reg-v2-input:focus,
.reg-v2-form input[type="email"]:focus,
.reg-v2-form input[type="password"]:focus,
.reg-v2-form input[type="text"]:focus {
	outline: none;
	border-color: #198754;
	box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.reg-v2-form .edit-cv-input::placeholder,
.reg-v2-form input[type="email"]::placeholder,
.reg-v2-form input[type="password"]::placeholder,
.reg-v2-form input[type="text"]::placeholder {
	color: #999;
}

.reg-v2-form select.reg-v2-status-select,
.reg-v2-form .reg-v2-field select {
	display: block;
	width: 100%;
	padding: 0.75rem 2.5rem 0.75rem 1rem;
	font-size: 1rem;
	line-height: 1.4;
	color: #333;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
	background-size: 12px;
	border: 1px solid #ccc;
	border-radius: 8px;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.reg-v2-form select.reg-v2-status-select:focus,
.reg-v2-form .reg-v2-field select:focus {
	outline: none;
	border-color: #198754;
	box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.reg-v2-form .chosen-container-single .chosen-single {
	height: auto;
	min-height: 2.75rem;
	padding: 0.6rem 2.5rem 0.6rem 1rem;
	font-size: 1rem;
	line-height: 1.4;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
}

.reg-v2-form .chosen-container-single .chosen-single:hover,
.reg-v2-form .chosen-container-active .chosen-single {
	border-color: #198754;
	box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.reg-v2-form .chosen-container .chosen-drop {
	border: 1px solid #ccc;
	border-top: 0;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.reg-v2-form .chosen-container .chosen-results li.highlighted {
	background: #198754;
	color: #fff;
}

.reg-v2-form .chosen-container-single .chosen-default {
	color: #999;
}

.reg-v2-form .reg-v2-terms-row {
	margin-bottom: 1.25rem;
}

.reg-v2-form .reg-v2-submit {
	width: 100%;
	margin-top: 0.75rem;
	padding: 14px 20px;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	background: #198754;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}

.reg-v2-form .reg-v2-submit:hover {
	background: #157347;
	transform: translateY(-1px);
}

.reg-v2-form-error,
.reg-v2-error {
	display: none;
	color: #c00;
	margin-top: 0.5rem;
	font-size: 0.9rem;
}

.reg-v2-modal-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	background: #f0f0f0;
	color: #333;
	border-radius: 8px;
	cursor: pointer;
	font-size: 1.35rem;
	line-height: 1;
	transition: background 0.2s;
	flex-shrink: 0;
}

.reg-v2-modal-close:hover {
	background: #e0e0e0;
}

.reg-v2-modal-cancel {
	display: inline-block;
	margin-top: 1.25rem;
	color: #666;
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.2s;
}

.reg-v2-modal-cancel:hover {
	color: #333;
}

/* Mobil: modal fullskärm */
@media (max-width: 767px) {
	.reg-v2-wrapper {
		margin: 1rem auto;
		padding: 1.5rem 1rem;
	}

	.reg-v2-title {
		font-size: 1.5rem;
	}

	.reg-v2-modal-box {
		min-height: 100vh;
		padding: 0;
		align-items: stretch;
	}

	.reg-v2-modal-inner {
		max-height: none;
		border-radius: 0;
		box-shadow: none;
		padding: 1.5rem;
	}
}
