/**
 * Arranca CCPA Frontend Styles
 *
 * Styles for consent banner, forms, and shortcode output.
 */

/* ==========================================================================
   CONSENT BANNER
   ========================================================================== */

.arranca-ccpa-banner {
	position: fixed;
	z-index: 999999;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
	bottom: 1.5rem;
	right: 1.5rem;
	max-width: 400px;
}

.arranca-ccpa-banner--bottom,
.arranca-ccpa-banner--top {
	/* Both positions now use bottom-right box */
	bottom: 1.5rem;
	right: 1.5rem;
}

.arranca-ccpa-banner--visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.arranca-ccpa-banner--hidden {
	opacity: 0;
	transform: translateY(20px);
	pointer-events: none;
}

.arranca-ccpa-banner__inner {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
	/* Frosted glass effect like header */
	background-color: rgba(10, 10, 10, 0.7) !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.arranca-ccpa-banner__content {
	width: 100%;
}

.arranca-ccpa-banner__text {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	line-height: 1.6;
}

.arranca-ccpa-banner__links {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.arranca-ccpa-banner__link {
	font-size: 0.75rem;
	text-decoration: underline;
	opacity: 0.8;
	transition: opacity 0.2s ease;
}

.arranca-ccpa-banner__link:hover {
	opacity: 1;
}

.arranca-ccpa-banner__actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.arranca-ccpa-banner .arranca-ccpa-btn,
.arranca-ccpa-banner button.arranca-ccpa-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0.75rem 1.5rem !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-align: center !important;
	text-decoration: none !important;
	border: 2px solid transparent !important;
	border-radius: 9999px !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	box-shadow: none !important;
	margin: 0 !important;
}

.arranca-ccpa-banner .arranca-ccpa-btn--accept,
.arranca-ccpa-banner button.arranca-ccpa-btn--accept {
	background-color: #fff !important;
	color: #000 !important;
	border-color: #fff !important;
	width: 100% !important;
}

.arranca-ccpa-banner .arranca-ccpa-btn--accept:hover,
.arranca-ccpa-banner button.arranca-ccpa-btn--accept:hover {
	background-color: transparent !important;
	color: #fff !important;
}

.arranca-ccpa-banner .arranca-ccpa-btn--decline,
.arranca-ccpa-banner button.arranca-ccpa-btn--decline {
	background-color: transparent !important;
	color: inherit !important;
	border-color: currentColor !important;
	opacity: 0.8;
	width: 100% !important;
}

.arranca-ccpa-banner .arranca-ccpa-btn--decline:hover,
.arranca-ccpa-banner button.arranca-ccpa-btn--decline:hover {
	opacity: 1;
	background-color: rgba(255, 255, 255, 0.1) !important;
}

.arranca-ccpa-btn--primary {
	background-color: #0073aa;
	color: #fff;
	border-color: #0073aa;
}

.arranca-ccpa-btn--primary:hover {
	background-color: #005177;
	border-color: #005177;
}

.arranca-ccpa-btn--secondary {
	background-color: transparent;
	color: #333;
	border-color: #ddd;
}

.arranca-ccpa-btn--secondary:hover {
	background-color: #f5f5f5;
	border-color: #ccc;
}

.arranca-ccpa-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ==========================================================================
   FORMS - Styled to match login page
   ========================================================================== */

.arranca-ccpa-request-form,
.arranca-ccpa-opt-out,
.arranca-ccpa-preferences {
	max-width: 640px;
	margin: 0 auto;
	padding: 2rem;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
}

/* Two-column layout for request form */
.arranca-ccpa-request-form--two-col {
	max-width: 1000px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	padding: 2.5rem;
}

.arranca-ccpa-request-form__info {
	display: flex;
	flex-direction: column;
}

.arranca-ccpa-request-form__info .arranca-ccpa-form__notice {
	margin-top: auto;
	margin-bottom: 0;
}

.arranca-ccpa-request-form__form {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 1.5rem;
}

.arranca-ccpa-request-form__form .arranca-ccpa-form {
	padding: 0;
	background: transparent;
	border: none;
}

@media (max-width: 768px) {
	.arranca-ccpa-request-form--two-col {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding: 1.5rem;
	}

	.arranca-ccpa-request-form__info .arranca-ccpa-form__notice {
		margin-top: 1.5rem;
	}
}

.arranca-ccpa-form__title {
	margin: 0 0 1.5rem;
	font-size: 1.25rem;
	font-weight: 300;
	color: #fafafa;
}

.arranca-ccpa-form__intro {
	margin: 0 0 1.5rem;
	color: #a3a3a3;
	line-height: 1.6;
}

.arranca-ccpa-form__rights {
	margin: 0 0 2rem;
	padding-left: 1.5rem;
	color: #a3a3a3;
	line-height: 1.8;
}

.arranca-ccpa-form__rights li {
	margin-bottom: 0.5rem;
}

.arranca-ccpa-form__rights li strong {
	color: #C9A962;
}

.arranca-ccpa-form__field {
	margin-bottom: 1.5rem;
}

.arranca-ccpa-form__label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	font-weight: 400;
	color: #a3a3a3;
}

.arranca-ccpa-form__label .required {
	color: #C9A962;
}

.arranca-ccpa-form__input,
.arranca-ccpa-form__select,
.arranca-ccpa-form__textarea {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	line-height: 1.5;
	color: #fafafa;
	background-color: #0a0a0a;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.arranca-ccpa-form__input::placeholder,
.arranca-ccpa-form__textarea::placeholder {
	color: #737373;
}

.arranca-ccpa-form__input:focus,
.arranca-ccpa-form__select:focus,
.arranca-ccpa-form__textarea:focus {
	outline: none;
	border-color: #C9A962;
	box-shadow: none;
	background-color: #0a0a0a;
}

.arranca-ccpa-form__select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a3a3a3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 1rem;
	padding-right: 2.5rem;
}

.arranca-ccpa-form__select option {
	background-color: #0a0a0a;
	color: #fafafa;
}

.arranca-ccpa-form__textarea {
	resize: vertical;
	min-height: 100px;
}

.arranca-ccpa-form__notice {
	padding: 1rem;
	margin-bottom: 1.5rem;
	background-color: rgba(255, 255, 255, 0.03);
	border-left: 4px solid #C9A962;
	border-radius: 0;
}

.arranca-ccpa-form__notice p {
	margin: 0;
	font-size: 0.875rem;
	color: #a3a3a3;
}

.arranca-ccpa-form__submit {
	margin-top: 2rem;
}

.arranca-ccpa-form__submit .arranca-ccpa-btn,
.arranca-ccpa-form__submit button.arranca-ccpa-btn {
	background: #C9A962 !important;
	border: none !important;
	border-radius: 8px !important;
	color: #0a0a0a !important;
	font-size: 1rem !important;
	font-weight: 500 !important;
	padding: 0.75rem 1.5rem !important;
	height: auto !important;
	text-shadow: none !important;
	box-shadow: none !important;
	transition: background-color 0.2s ease !important;
	width: 100% !important;
	cursor: pointer !important;
}

.arranca-ccpa-form__submit .arranca-ccpa-btn:hover,
.arranca-ccpa-form__submit button.arranca-ccpa-btn:hover {
	background: #d4b976 !important;
	color: #0a0a0a !important;
	box-shadow: none !important;
}

.arranca-ccpa-form__message {
	margin-top: 1rem;
	padding: 1rem;
	border-radius: 8px;
	font-size: 0.9375rem;
}

.arranca-ccpa-form__message--success {
	background-color: rgba(201, 169, 98, 0.1);
	border: 1px solid rgba(201, 169, 98, 0.3);
	color: #C9A962;
}

.arranca-ccpa-form__message--error {
	background-color: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.3);
	color: #ef4444;
}

/* ==========================================================================
   OPT-OUT FORM
   ========================================================================== */

.arranca-ccpa-opt-out__status {
	margin: 1.5rem 0;
	padding: 1rem;
	background-color: rgba(255, 255, 255, 0.03);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.arranca-ccpa-opt-out__status p strong {
	color: #fafafa;
}

.arranca-ccpa-status {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.5rem 0 0;
	font-size: 0.9375rem;
}

.arranca-ccpa-status__icon {
	font-size: 1.25rem;
}

.arranca-ccpa-status--opted-out {
	color: #C9A962;
}

.arranca-ccpa-status--opted-in {
	color: #a3a3a3;
}

.arranca-ccpa-status--unknown {
	color: #737373;
}

.arranca-ccpa-opt-out__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1.5rem;
}

.arranca-ccpa-opt-out__actions .arranca-ccpa-btn--primary,
.arranca-ccpa-opt-out__actions button.arranca-ccpa-btn--primary {
	background: #C9A962 !important;
	border: none !important;
	border-radius: 8px !important;
	color: #0a0a0a !important;
	font-size: 1rem !important;
	font-weight: 500 !important;
	padding: 0.75rem 1.5rem !important;
	transition: background-color 0.2s ease !important;
}

.arranca-ccpa-opt-out__actions .arranca-ccpa-btn--primary:hover,
.arranca-ccpa-opt-out__actions button.arranca-ccpa-btn--primary:hover {
	background: #d4b976 !important;
}

.arranca-ccpa-opt-out__actions .arranca-ccpa-btn--secondary,
.arranca-ccpa-opt-out__actions button.arranca-ccpa-btn--secondary {
	background: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	border-radius: 8px !important;
	color: #a3a3a3 !important;
	font-size: 1rem !important;
	font-weight: 500 !important;
	padding: 0.75rem 1.5rem !important;
	transition: all 0.2s ease !important;
}

.arranca-ccpa-opt-out__actions .arranca-ccpa-btn--secondary:hover,
.arranca-ccpa-opt-out__actions button.arranca-ccpa-btn--secondary:hover {
	border-color: #C9A962 !important;
	color: #C9A962 !important;
}

/* ==========================================================================
   PREFERENCES FORM
   ========================================================================== */

.arranca-ccpa-preferences__categories {
	margin: 1.5rem 0;
}

.arranca-ccpa-preference {
	padding: 1rem;
	margin-bottom: 1rem;
	background-color: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
}

.arranca-ccpa-preference:last-child {
	margin-bottom: 0;
}

.arranca-ccpa-preference__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.5rem;
}

.arranca-ccpa-preference__header h4 {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	color: #fafafa;
}

.arranca-ccpa-preference p {
	margin: 0;
	font-size: 0.875rem;
	color: #a3a3a3;
	line-height: 1.5;
}

.arranca-ccpa-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	border-radius: 100px;
}

.arranca-ccpa-badge--required {
	background-color: rgba(255, 255, 255, 0.1);
	color: #a3a3a3;
}

.arranca-ccpa-badge--enabled {
	background-color: rgba(201, 169, 98, 0.2);
	color: #C9A962;
}

.arranca-ccpa-badge--disabled {
	background-color: rgba(239, 68, 68, 0.2);
	color: #ef4444;
}

.arranca-ccpa-preferences__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.arranca-ccpa-preferences__actions .arranca-ccpa-btn--primary,
.arranca-ccpa-preferences__actions button.arranca-ccpa-btn--primary {
	background: #C9A962 !important;
	border: none !important;
	border-radius: 8px !important;
	color: #0a0a0a !important;
	font-size: 1rem !important;
	font-weight: 500 !important;
	padding: 0.75rem 1.5rem !important;
	transition: background-color 0.2s ease !important;
}

.arranca-ccpa-preferences__actions .arranca-ccpa-btn--primary:hover,
.arranca-ccpa-preferences__actions button.arranca-ccpa-btn--primary:hover {
	background: #d4b976 !important;
}

.arranca-ccpa-preferences__actions .arranca-ccpa-btn--secondary,
.arranca-ccpa-preferences__actions button.arranca-ccpa-btn--secondary {
	background: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	border-radius: 8px !important;
	color: #a3a3a3 !important;
	font-size: 1rem !important;
	font-weight: 500 !important;
	padding: 0.75rem 1.5rem !important;
	transition: all 0.2s ease !important;
}

.arranca-ccpa-preferences__actions .arranca-ccpa-btn--secondary:hover,
.arranca-ccpa-preferences__actions button.arranca-ccpa-btn--secondary:hover {
	border-color: #C9A962 !important;
	color: #C9A962 !important;
}

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

@media (max-width: 480px) {
	.arranca-ccpa-banner {
		left: 1rem;
		right: 1rem;
		bottom: 1rem;
		max-width: none;
	}

	.arranca-ccpa-banner__inner {
		padding: 1.25rem;
	}

	.arranca-ccpa-banner__text {
		font-size: 0.8125rem;
	}
}

@media (max-width: 768px) {
	.arranca-ccpa-request-form,
	.arranca-ccpa-opt-out,
	.arranca-ccpa-preferences {
		padding: 1.5rem;
	}

	.arranca-ccpa-opt-out__actions,
	.arranca-ccpa-preferences__actions {
		flex-direction: column;
	}

	.arranca-ccpa-opt-out__actions .arranca-ccpa-btn,
	.arranca-ccpa-preferences__actions .arranca-ccpa-btn {
		width: 100%;
	}
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.arranca-ccpa-btn:focus-visible,
.arranca-ccpa-form__input:focus-visible,
.arranca-ccpa-form__select:focus-visible,
.arranca-ccpa-form__textarea:focus-visible,
.arranca-ccpa-banner__link:focus-visible {
	outline: 2px solid #C9A962;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.arranca-ccpa-banner,
	.arranca-ccpa-btn {
		transition: none;
	}
}
