/**
 * Speaker Card Block - Frontend & Editor Styles
 */

/* ===========================================
   CARD STYLES
   =========================================== */

.kbd-speaker-card {
	display: flex;
	border: 3px solid var(--wp--preset--color--primary-blue);
	background-color: var(--wp--preset--color--primary-white);
	transition: opacity 0.2s ease;
}

.kbd-speaker-card:hover {
	opacity: 0.95;
}

/* Image */
.kbd-speaker-card__image {
	width: 200px;
	min-width: 200px;
	min-height: 200px;
	background-color: var(--wp--preset--color--secondary-salmon);
	border-right: 3px solid var(--wp--preset--color--primary-blue);
	overflow: hidden;
}

.kbd-speaker-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

.kbd-speaker-card__image-placeholder-frontend {
	width: 100%;
	height: 100%;
	min-height: 200px;
	background-color: var(--wp--preset--color--secondary-salmon);
}

/* Content */
.kbd-speaker-card__content {
	flex: 1;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kbd-speaker-card__name {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--h-5);
	font-weight: 600;
	line-height: 1.3;
	color: var(--wp--preset--color--primary-blue);
	margin: 0;
}

.kbd-speaker-card__title {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 400;
	line-height: 1.4;
	color: var(--wp--preset--color--primary-blue);
	margin: 0;
	flex: 1;
}

/* More button */
.kbd-speaker-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: none;
	padding: 0;
	margin-top: auto;
	cursor: pointer;
	color: var(--wp--preset--color--primary-blue);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.kbd-speaker-card__more:hover {
	opacity: 0.8;
}

.kbd-speaker-card__more-text {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.kbd-speaker-card__more-arrow {
	flex-shrink: 0;
}

/* ===========================================
   MODAL STYLES
   =========================================== */

.kbd-speaker-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.kbd-speaker-modal--open {
	opacity: 1;
	visibility: visible;
}

.kbd-speaker-modal--closing {
	opacity: 0;
	visibility: hidden;
}

/* Backdrop */
.kbd-speaker-modal__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.85);
	cursor: pointer;
}

/* Container */
.kbd-speaker-modal__container {
	position: relative;
	max-width: 800px;
	width: calc(100% - 40px);
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	background-color: var(--wp--preset--color--primary-white);
	border: 3px solid var(--wp--preset--color--primary-blue);
}

/* Close button */
.kbd-speaker-modal__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--primary-white);
	border: 2px solid var(--wp--preset--color--primary-blue);
	cursor: pointer;
	color: var(--wp--preset--color--primary-blue);
	transition: opacity 0.2s ease;
	z-index: 10;
}

.kbd-speaker-modal__close:hover {
	opacity: 0.8;
}

.kbd-speaker-modal__close:focus {
	outline: 3px solid var(--wp--preset--color--primary-blue);
	outline-offset: 2px;
}

/* Content */
.kbd-speaker-modal__content {
	padding: 40px;
}

/* Header */
.kbd-speaker-modal__header {
	display: flex;
	gap: 30px;
	margin-bottom: 30px;
}

.kbd-speaker-modal__image {
	width: 200px;
	min-width: 200px;
	height: 200px;
	border: 3px solid var(--wp--preset--color--primary-blue);
	overflow: hidden;
	flex-shrink: 0;
}

.kbd-speaker-modal__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

.kbd-speaker-modal__info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
}

.kbd-speaker-modal__name {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--h-3);
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--primary-blue);
	margin: 0;
}

.kbd-speaker-modal__title {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 400;
	line-height: 1.4;
	color: var(--wp--preset--color--primary-blue);
	margin: 0;
}

/* Bio */
.kbd-speaker-modal__bio {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 400;
	line-height: 1.6;
	color: var(--wp--preset--color--primary-blue);
	margin-bottom: 30px;
}

/* Social Links */
.kbd-speaker-modal__links {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	padding-top: 20px;
	border-top: 3px solid var(--wp--preset--color--primary-blue);
}

.kbd-speaker-modal__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--wp--preset--color--primary-blue);
	text-decoration: none;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	transition: opacity 0.2s ease;
}

.kbd-speaker-modal__link:hover {
	opacity: 0.8;
	text-decoration: underline;
}

.kbd-speaker-modal__link svg {
	flex-shrink: 0;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

/* Tablet */
@media (max-width: 1024px) {
	.kbd-speaker-card__name {
		font-size: var(--wp--preset--font-size--body);
	}

	.kbd-speaker-modal__content {
		padding: 30px;
	}

	.kbd-speaker-modal__header {
		gap: 20px;
	}

	.kbd-speaker-modal__name {
		font-size: var(--wp--preset--font-size--h-4);
	}
}

/* Mobile */
@media (max-width: 768px) {
	.kbd-speaker-card {
		flex-direction: column;
	}

	.kbd-speaker-card__image {
		width: 100%;
		min-width: 100%;
		height: 280px;
		min-height: 280px;
		border-right: none;
		border-bottom: 3px solid var(--wp--preset--color--primary-blue);
	}

	.kbd-speaker-card__content {
		padding: 20px;
	}

	.kbd-speaker-modal__container {
		width: calc(100% - 20px);
		max-height: calc(100vh - 40px);
	}

	.kbd-speaker-modal__content {
		padding: 20px;
		padding-top: 60px; /* Space for close button */
	}

	.kbd-speaker-modal__header {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.kbd-speaker-modal__image {
		width: 150px;
		min-width: 150px;
		height: 150px;
	}

	.kbd-speaker-modal__name {
		font-size: 1.375rem;
	}

	.kbd-speaker-modal__title {
		font-size: var(--wp--preset--font-size--small);
	}

	.kbd-speaker-modal__bio {
		font-size: var(--wp--preset--font-size--small);
	}

	.kbd-speaker-modal__links {
		justify-content: center;
	}
}
