/**
 * Gamplify Group Events - Public Styles
 *
 * @package Gamplify Group Events
 * @since 1.0.0
 */

/* General Styles */
.gge-all-events-wrap,
.gge-add-event-wrap,
.gge-dashboard-wrap,
.gge-zoom-config-wrap {
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Header Styles */
.gge-events-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #f0f0f0;
}

.gge-events-header h2 {
	margin: 0;
	font-size: 28px;
	color: #333;
}

/* Filter Styles */
.gge-events-filter {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
}

.gge-filter-select {
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.gge-view-toggle {
	display: flex;
	gap: 10px;
}

.gge-view-btn {
	padding: 8px 12px;
	border: 1px solid #ddd;
	background: #fff;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.3s;
}

.gge-view-btn.active {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
}

.gge-view-btn:hover {
	background: #f0f0f0;
}

.gge-view-btn.active:hover {
	background: #005a87;
}

/* Events Grid */
.gge-events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 25px;
}

.gge-events-container {
	display: none;
}

.gge-events-container.active {
	display: block;
}

.gge-events-grid.active {
    display: grid;
}

/* Event Card */
.gge-event-card {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s;
}

.gge-event-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gge-event-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.gge-event-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.gge-event-card:hover .gge-event-image img {
	transform: scale(1.05);
}

.gge-event-content {
	padding: 20px;
}

.gge-event-title {
	margin: 0 0 15px;
	font-size: 20px;
}

.gge-event-title a {
	color: #333;
	text-decoration: none;
}

.gge-event-title a:hover {
	color: #0073aa;
}

.gge-event-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 15px;
	font-size: 14px;
	color: #666;
}

.gge-event-meta span {
	display: flex;
	align-items: center;
	gap: 5px;
}

.gge-event-type {
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.gge-type-free {
	background: #e8f5e9;
	color: #2e7d32;
}

.gge-type-rsvp {
	background: #e3f2fd;
	color: #1976d2;
}

.gge-type-paid {
	background: #fff3e0;
	color: #f57c00;
}

.gge-type-custom {
	background: #f3e5f5;
	color: #7b1fa2;
}

.gge-event-excerpt {
	margin-bottom: 15px;
	color: #666;
	line-height: 1.6;
}

.gge-event-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.gge-event-actions .button {
	flex: 1;
	min-width: 80px;
	text-align: center;
}

/* List View */
.gge-event-list-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	margin-bottom: 15px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	transition: background 0.3s;
}

.gge-event-list-item:hover {
	background: #f9f9f9;
}

.gge-event-list-content {
	flex: 1;
}

.gge-event-list-actions {
	display: flex;
	gap: 10px;
}

/* No Events */
.gge-no-events {
	text-align: center;
	padding: 60px 20px;
}

.gge-no-events p {
	font-size: 18px;
	color: #666;
	margin-bottom: 20px;
}

/* Dashboard Styles */
.gge-dashboard-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.gge-stat-card {
	padding: 25px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border-radius: 8px;
	text-align: center;
}

.gge-stat-number {
	font-size: 48px;
	font-weight: bold;
	margin-bottom: 10px;
}

.gge-stat-label {
	font-size: 16px;
	opacity: 0.9;
}

.gge-dashboard-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
}

.gge-dashboard-table th,
.gge-dashboard-table td {
	padding: 15px;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
}

.gge-dashboard-table th {
	background: #f5f5f5;
	font-weight: 600;
	color: #333;
}

.gge-dashboard-table tr:hover {
	background: #f9f9f9;
}

.gge-type-badge {
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}

/* Modal */
.gge-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gge-modal-content {
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	max-width: 600px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
}

.gge-modal-close {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 28px;
	cursor: pointer;
	color: #999;
}

.gge-modal-close:hover {
	color: #333;
}

/* Responsive */
@media (max-width: 768px) {
	.gge-events-grid {
		grid-template-columns: 1fr;
	}

	.gge-events-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.gge-events-filter {
		flex-direction: column;
		gap: 15px;
	}

	.gge-event-list-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.gge-event-list-actions {
		width: 100%;
	}

	.gge-event-list-actions .button {
		flex: 1;
	}
}

/* Sidebar Layout */
.gge-main-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.gge-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    align-self: flex-start;
}

.gge-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gge-sidebar-menu li {
    border-bottom: 1px solid #eee;
    margin: 0;
}

.gge-sidebar-menu li:last-child {
    border-bottom: none;
}

.gge-sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.gge-sidebar-menu a:hover {
    background-color: #f8f9fa;
    color: #0073aa;
}

.gge-sidebar-menu a.active {
    background-color: #0073aa;
    color: #fff;
}

.gge-content-area {
    flex-grow: 1;
    min-width: 0; /* Prevent overflow issues */
}

.gge-tab-view {
    display: block;
}

.gge-tab-view.active {
    display: block;
}

/* Category View Styles */
.gge-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.gge-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gge-cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 4px;
    background: #fff;
}

.gge-cat-name {
    font-weight: 500;
}

/* Zoom Integration Styles */
.gge-zoom-form-row {
    margin-bottom: 20px;
}

.gge-zoom-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.gge-zoom-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gge-zoom-submit {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .gge-main-wrapper {
        flex-direction: column;
    }

    .gge-sidebar {
        width: 100%;
    }
}


/* Form Container */
.gge-event-form,
.gge-zoom-form {
    max-width: 900px;
}

/* Form Rows */
.gge-form-row {
    margin-bottom: 25px;
}

.gge-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Labels */
.gge-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gge-label.required::after {
    content: " *";
    color: #d63638;
}

/* Inputs */
.gge-input,
.gge-select,
.gge-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.gge-select {
    padding: 5px 15px;
}

.gge-input:focus,
.gge-select:focus,
.gge-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.gge-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Select Multiple */
.gge-select[multiple] {
    min-height: 120px;
}

/* Checkbox */
.gge-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.gge-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Field Description */
.gge-field-description {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Image Upload */
.gge-image-upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gge-image-preview {
    max-width: 400px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 10px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gge-image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.gge-image-preview:empty::before {
    content: "No image selected";
    color: #999;
}

/* Form Submit */
.gge-form-submit {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.gge-submit-btn {
    padding: 12px 30px !important;
    font-size: 16px !important;
}

/* Form Message */
.gge-form-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.gge-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gge-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Zoom Help */
.gge-zoom-help {
    margin-top: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.gge-zoom-help h3 {
    margin-top: 0;
    color: #0073aa;
}

.gge-zoom-help ol {
    line-height: 1.8;
}

.gge-zoom-help li {
    margin-bottom: 10px;
}

/* Zoom Info */
.gge-zoom-info {
    padding: 20px;
    background: #e7f3ff;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #0073aa;
}

.gge-zoom-info p {
    margin: 10px 0;
}

.gge-zoom-info a {
    color: #0073aa;
    text-decoration: underline;
}

/* Form Actions */
.gge-form-actions {
    display: flex;
    gap: 15px;
}

/* Loading State */
.gge-submit-btn.loading,
.gge-save-zoom-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.gge-submit-btn.loading::after,
.gge-save-zoom-btn.loading::after {
    content: "...";
    animation: loading 1s infinite;
}

.gge-content-area table thead tr th {
    background: #f7f8f8;
}

@keyframes loading {

    0%,
    20% {
        content: ".";
    }

    40% {
        content: "..";
    }

    60%,
    100% {
        content: "...";
    }
}

/* Responsive */
@media (max-width: 768px) {
    .gge-form-row-half {
        grid-template-columns: 1fr;
    }

    .gge-form-submit,
    .gge-form-actions {
        flex-direction: column;
    }
    .gge-textarea {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        transition: border-color 0.3s;
    }

    .gge-input:focus,
    .gge-select:focus,
    .gge-textarea:focus {
        outline: none;
        border-color: #0073aa;
        box-shadow: 0 0 0 1px #0073aa;
    }

    .gge-textarea {
        resize: vertical;
        min-height: 100px;
    }

    /* Select Multiple */

    .gge-select[multiple] {
        min-height: 120px;
    }

    /* Checkbox */

    .gge-checkbox-label {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }

    .gge-checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    /* Field Description */

    .gge-field-description {
        margin-top: 8px;
        font-size: 13px;
        color: #666;
        font-style: italic;
    }

    /* Image Upload */

    .gge-image-upload {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .gge-image-preview {
        max-width: 400px;
        border: 2px dashed #ddd;
        border-radius: 4px;
        padding: 10px;
        min-height: 150px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gge-image-preview img {
        max-width: 100%;
        height: auto;
        border-radius: 4px;
    }

    .gge-image-preview:empty::before {
        content: "No image selected";
        color: #999;
    }

    /* Form Submit */

    .gge-form-submit {
        display: flex;
        gap: 15px;
        padding-top: 20px;
        border-top: 2px solid #f0f0f0;
    }

    .gge-submit-btn {
        padding: 12px 30px !important;
        font-size: 16px !important;
    }

    /* Form Message */

    .gge-form-message {
        padding: 15px;
        border-radius: 4px;
        margin-top: 20px;
    }

    .gge-form-message.success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    .gge-form-message.error {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

    /* Zoom Help */

    .gge-zoom-help {
        margin-top: 40px;
        padding: 25px;
        background: #f9f9f9;
        border-radius: 8px;
        border-left: 4px solid #0073aa;
    }

    .gge-zoom-help h3 {
        margin-top: 0;
        color: #0073aa;
    }

    .gge-zoom-help ol {
        line-height: 1.8;
    }

    .gge-zoom-help li {
        margin-bottom: 10px;
    }

    /* Zoom Info */

    .gge-zoom-info {
        padding: 20px;
        background: #e7f3ff;
        border-radius: 8px;
        margin-bottom: 30px;
        border-left: 4px solid #0073aa;
    }

    .gge-zoom-info p {
        margin: 10px 0;
    }

    .gge-zoom-info a {
        color: #0073aa;
        text-decoration: underline;
    }

    /* Form Actions */

    .gge-form-actions {
        display: flex;
        gap: 15px;
    }

    /* Loading State */

    .gge-submit-btn.loading,
    .gge-save-zoom-btn.loading {
        opacity: 0.6;
        pointer-events: none;
    }

    .gge-submit-btn.loading::after,
    .gge-save-zoom-btn.loading::after {
        content: "...";
        animation: loading 1s infinite;
    }

    @keyframes loading {

        0%,
        20% {
            content: ".";
        }

        40% {
            content: "..";
        }

        60%,
        100% {
            content: "...";
        }
    }

    /* Responsive */
    @media (max-width: 768px) {
        .gge-form-row-half {
            grid-template-columns: 1fr;
        }

        .gge-form-submit,
        .gge-form-actions {
            flex-direction: column;
        }

        .gge-form-submit .button,
        .gge-form-actions .button {
            width: 100%;
        }
    }

    /* Toggle Switch Styles */

    .gge-toggle-switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 24px;
    }

    .gge-toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .gge-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transition: 0.3s;
        border-radius: 24px;
        background-color: #ccc;
    }

    .gge-slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.3s;
        border-radius: 50%;
    }

    .gge-toggle-switch input:checked + .gge-slider {
        background-color: #0073aa;
    }

    .gge-toggle-switch input:checked + .gge-slider:before {
        transform: translateX(26px);
    }

    .gge-on-text,
    .gge-off-text {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
        font-weight: bold;
        pointer-events: none;
        transition: opacity 0.2s;
        left: 56px;
    }

    .gge-toggle-switch input:checked + .gge-slider .gge-on-text {
        opacity: 1;
    }

    .gge-toggle-switch input:checked + .gge-slider .gge-off-text {
        opacity: 0;
    }

    .gge-toggle-switch input:not(:checked) + .gge-slider .gge-on-text {
        opacity: 0;
    }

    .gge-toggle-switch input:not(:checked) + .gge-slider .gge-off-text {
        opacity: 1;
    }

    /* Select2 Compatibility */

    .gge-select2 {
        width: 100% !important;
    }

    /* Tabs */

    .gge-tabs-nav {
        display: flex;
        padding: 0;
        list-style: none;
        overflow-x: auto;
    }

    .gge-tabs-nav li {
        padding: 12px 20px;
        cursor: pointer;
        font-weight: 600;
        color: #555;
        border-bottom: 2px solid transparent;
        margin-bottom: -2px;
        white-space: nowrap;
        transition: all 0.2s ease;
    }

    .gge-tabs-nav li:hover {
        color: #0073aa;
        background-color: #f8f8f8;
    }

    .gge-tabs-nav li.active {
        color: #0073aa;
        border-bottom-color: #0073aa;
    }

    .gge-tab-content {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .gge-tab-content.active {
        display: block;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}