/**
 * Global Button System - Professional Black & White Design
 *
 * @package Coursee
 * @since 1.0.0
 */

/* ============================================
   BASE BUTTON STYLES - ULTRA PROFESSIONAL
   ============================================ */

.button,
button.button,
a.button,
input[type="submit"].button,
input[type="button"].button,
input[type="submit"],
button,
a.button-primary,
a.button-secondary,
.coursee-enroll-btn,
.coursee-start-quiz-btn,
.course-view-btn,
.enroll-button,
.continue-learning-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.75rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
	border: 2px solid #000000;
	border-radius: 0;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
	white-space: nowrap;
	user-select: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: #000000;
	color: #ffffff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.button::before,
button.button::before,
a.button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: #ffffff;
	transition: left 0.3s ease;
	z-index: 0;
}

.button:hover::before,
button.button:hover::before,
a.button:hover::before {
	left: 0;
}

.button > *,
button.button > *,
a.button > * {
	position: relative;
	z-index: 1;
}

.button:focus,
button.button:focus,
a.button:focus,
input[type="submit"].button:focus,
input[type="button"].button:focus {
	outline: 2px solid #000000;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

.button:disabled,
button.button:disabled,
a.button:disabled,
input[type="submit"].button:disabled,
input[type="button"].button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
	background: #6b7280;
	border-color: #6b7280;
}

.button:hover,
button.button:hover,
a.button:hover {
	text-decoration: none;
	color: #000000;
	background: #ffffff;
	border-color: #000000;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	transform: translateY(-2px);
}

.button:active,
button.button:active,
a.button:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   PRIMARY BUTTON - BLACK & WHITE
   ============================================ */

.button-primary,
.button.button-primary,
button.button-primary,
a.button-primary,
.coursee-enroll-btn,
.enroll-button {
	background: #000000;
	color: #ffffff;
	border-color: #000000;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.button-primary::before,
.button.button-primary::before,
button.button-primary::before,
a.button-primary::before {
	background: #ffffff;
}

.button-primary:hover,
.button.button-primary:hover,
button.button-primary:hover,
a.button-primary:hover,
.coursee-enroll-btn:hover,
.enroll-button:hover {
	background: #ffffff;
	border-color: #000000;
	color: #000000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	transform: translateY(-2px);
}

.button-primary:active,
.button.button-primary:active,
button.button-primary:active,
a.button-primary:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   SECONDARY BUTTON - BLACK & WHITE
   ============================================ */

.button-secondary,
.button.button-secondary,
button.button-secondary,
a.button-secondary {
	background: #ffffff;
	color: #000000;
	border-color: #000000;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button-secondary::before,
.button.button-secondary::before,
button.button-secondary::before,
a.button-secondary::before {
	background: #000000;
}

.button-secondary:hover,
.button.button-secondary:hover,
button.button-secondary:hover,
a.button-secondary:hover {
	background: #000000;
	border-color: #000000;
	color: #ffffff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	transform: translateY(-2px);
}

.button-secondary:active,
.button.button-secondary:active,
button.button-secondary:active,
a.button-secondary:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   OUTLINE BUTTON - BLACK & WHITE
   ============================================ */

.button-outline,
.button.button-outline,
button.button-outline,
a.button-outline {
	background: transparent;
	border: 2px solid #000000;
	color: #000000;
	font-weight: 700;
}

.button-outline::before,
.button.button-outline::before,
button.button-outline::before,
a.button-outline::before {
	background: #000000;
}

.button-outline:hover,
.button.button-outline:hover,
button.button-outline:hover,
a.button-outline:hover {
	background: #000000;
	border-color: #000000;
	color: #ffffff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	transform: translateY(-2px);
}

.button-outline:active,
.button.button-outline:active,
button.button-outline:active,
a.button-outline:active {
	transform: translateY(0);
	background: #000000;
	color: #ffffff;
}

/* ============================================
   SUCCESS BUTTON - BLACK & WHITE
   ============================================ */

.button-success,
.button.button-success,
button.button-success,
a.button-success {
	background: #000000;
	color: #ffffff;
	border-color: #000000;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.button-success::before,
.button.button-success::before,
button.button-success::before,
a.button-success::before {
	background: #ffffff;
}

.button-success:hover,
.button.button-success:hover,
button.button-success:hover,
a.button-success:hover {
	background: #ffffff;
	border-color: #000000;
	color: #000000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	transform: translateY(-2px);
}

/* ============================================
   DANGER BUTTON - BLACK & WHITE
   ============================================ */

.button-danger,
.button.button-danger,
button.button-danger,
a.button-danger {
	background: #000000;
	color: #ffffff;
	border-color: #000000;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.button-danger::before,
.button.button-danger::before,
button.button-danger::before,
a.button-danger::before {
	background: #ffffff;
}

.button-danger:hover,
.button.button-danger:hover,
button.button-danger:hover,
a.button-danger:hover {
	background: #ffffff;
	border-color: #000000;
	color: #000000;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
	transform: translateY(-2px);
}

/* ============================================
   BUTTON SIZES
   ============================================ */

.button-small,
.button.button-small,
button.button-small,
a.button-small {
	padding: 0.625rem 1.25rem;
	font-size: 0.8125rem;
	font-weight: 700;
}

.button-large,
.button.button-large,
button.button-large,
a.button-large,
.continue-learning-btn {
	padding: 1rem 2.25rem;
	font-size: 1rem;
	font-weight: 700;
}

.button-full,
.button.button-full,
button.button-full,
a.button-full {
	width: 100%;
	justify-content: center;
}

/* ============================================
   BUTTON WITH ICONS
   ============================================ */

.button .dashicons,
.button .icon {
	font-size: 1.125rem;
	width: 1.125rem;
	height: 1.125rem;
	line-height: 1;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
}

.button-primary .dashicons,
.button-primary .icon,
.button-success .dashicons,
.button-success .icon,
.button-danger .dashicons,
.button-danger .icon {
	color: #ffffff;
}

.button-primary:hover .dashicons,
.button-primary:hover .icon,
.button-success:hover .dashicons,
.button-success:hover .icon,
.button-danger:hover .dashicons,
.button-danger:hover .icon {
	color: #000000;
}

.button-secondary .dashicons,
.button-secondary .icon,
.button-outline .dashicons,
.button-outline .icon {
	color: #000000;
}

.button-secondary:hover .dashicons,
.button-secondary:hover .icon,
.button-outline:hover .dashicons,
.button-outline:hover .icon {
	color: #ffffff;
}

/* ============================================
   BUTTON GROUPS
   ============================================ */

.button-group {
	display: inline-flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.button-group .button {
	margin: 0;
}

/* ============================================
   LOADING STATE
   ============================================ */

.button.loading,
button.button.loading {
	position: relative;
	color: transparent;
	pointer-events: none;
}

.button.loading::after,
button.button.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	z-index: 2;
}

.button-secondary.loading::after,
.button-outline.loading::after {
	border-color: rgba(0, 0, 0, 0.3);
	border-top-color: #000000;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* ============================================
   SPECIAL BUTTONS
   ============================================ */

.course-view-btn,
.continue-learning-btn {
	width: 100%;
	justify-content: center;
}

.coursee-start-quiz-btn {
	width: 100%;
	justify-content: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
	.button,
	button.button,
	a.button,
	input[type="submit"],
	button {
		padding: 0.75rem 1.5rem;
		font-size: 0.875rem;
		min-height: 48px;
	}
	
	.button-large,
	button.button-large,
	a.button-large {
		padding: 0.875rem 2rem;
		font-size: 0.9375rem;
		min-height: 52px;
	}
	
	.button-group {
		flex-direction: column;
		width: 100%;
	}
	
	.button-group .button {
		width: 100%;
	}
}
