/**
Theme Name: deponi
Author: VAIA Digital AB
Author URI: https://vaia.se
Description: Theme for s Blmquist Entreprenad
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: deponi
Template: astra
*/

.gform-theme--foundation .gform_fields {
	row-gap: 30px;
}
.gform-theme--framework .gf_step_active .gf_step_number {
	--gf-local-bg-color: #c40c06;
	--gf-local-border-color: #c40c06;
	color: #fff;
}
body .gform-theme--framework .gf_step_completed .gf_step_number::after {
	display: none;
}
.gform-theme--framework .gf_step_completed .gf_step_number {
	--gf-local-bg-color: #808080;
	--gf-local-border-color: #808080;
}
.gform-body.gform_body {
	margin-bottom: 40px;
}
.gform-theme--framework .gf_page_steps, 
.gform-theme--framework .gf_progressbar_wrapper {
	flex-wrap: nowrap;
	text-align: center;
	justify-content: space-around;
	margin-bottom: 40px; 
}
.gform-theme--framework .gf_step {
	flex-direction: column;
}

.gform-body.gform_body .form-notice {
	padding: 20px 40px 20px 60px;
	background: url(assets/img/light_bulb.svg) no-repeat #f2f2f2;
	background-position: 10px 30px;
	background-size: 40px;
}
body .gform_next_button.gform-theme-button.button,
body #gform_submit_button_1.gform_button.button,
body .button.gform_button_select_files {
	background-color: #c40c06 !important;
}

.gform-theme--framework:where(:not(.gform_editor)) .gfield--type-section {
	border-bottom: 0;
	padding-bottom: 0;
}
.gform-theme--framework:where(:not(.gform_editor)) .gfield--type-section h3 {
	margin-bottom: 0;
}

.gf-review .gf-review-list {
	background: #f2f2f2;
	padding: 40px;
}

.gf-review table,
.gf-review table tr {
	background-color: transparent !important;
	border: 0;
}
.gf-review table * {
	font-size: 18px !important;
}
.gf-review table > td {
	padding: 0;
	border: 0;
}
.gf-review table td {
	border: 0;
}
.gf-review .map-it-link {
	display: none;
}

/* Din befintliga layout */
.gf-review-list { margin: 0; padding: 0; }
.gf-review-row { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: .5rem 1rem; 
  padding:.4rem 0; 
  border-bottom: 1px solid #eee; 
}
.gf-review-row dt { font-weight: 600; }
.gf-review-row dd { margin: 0; }

/* Gör sektionsrubriken till en fullbreddsrad inuti samma lista */
.gf-review-row--section { 
  grid-template-columns: 1fr !important; 
  border-bottom: none; 
  padding-top: 1rem; 
}
.gf-review-section-title {
  font-weight: 700;
  margin-top: .25rem;
  padding: .15rem 0;
  border-bottom: 1px solid #ddd;
  color: #333;
}

/* Policys form */
#gform_3 .gfield_label {
	font-size: 22px;
	font-weight: 600;
}
.policy-modal__header button:hover {
	background: #c40c06;
	color: #fff;
}
/* Overlay */
.policy-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: flex-start;   /* lägg dialogen från toppen, inte centrerad */
	justify-content: center;
	background: rgba(0, 0, 0, 0.65);
	padding: 1rem;             /* ger luft runt om, även upptill */
}

/* Visa modalen */
.policy-modal--open {
	display: flex;
}

/* Själva dialog-rutan */
.policy-modal__dialog {
	background: #fff;
	max-width: 960px;
	width: 100%;
	max-height: calc(100vh - 2rem);  /* 2rem = padding top+bottom */
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	overflow: hidden;
}

/* Header */
.policy-modal__header {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.policy-modal__title {
	font-size: 1rem;
	margin: 0;
}

/* Close-knapp */
.policy-modal__close {
	border: none;
	background: transparent;
	font-size: 1.2rem;
	cursor: pointer;
}

/* Body med PDF */
.policy-modal__body {
	flex: 1;
	min-height: 50vh;
	max-height: calc(100vh - 2rem - 50px); /* 50px ≈ headerhöjd */
	display: flex;
	flex-direction: column;
}

.policy-modal__iframe {
	border: none;
	width: 100%;
	flex: 1;
}

.policy-modal__fallback-link {
	padding: 0.5rem 1rem 1rem;
	font-size: 0.875rem;
	text-align: right;
}

/* Mobilanpassning */
@media (max-width: 768px) {
	.policy-modal {
		padding: 0.75rem;
	}
	.policy-modal__body {
		flex: 1;
		min-height: 75vh;
		max-height: calc(100vh - 2rem - 50px); /* 50px ≈ headerhöjd */
		display: flex;
		flex-direction: column;
	}
	.policy-modal__dialog {
		border-radius: 8px;
		width: 100%;
		max-height: calc(100vh - 1.5rem);
	}
}

/* Om du är inloggad och har adminbaren */
body.admin-bar .policy-modal {
	padding-top: 3.5rem; /* flytta ner lite extra under admin-baren */
}