/* Zebaq(N) Guest Manager - Main Stylesheet */

/* Variables */
:root {
    --primary-color: #0073aa;
    --primary-dark: #004a87;
    --success-color: #46b450;
    --danger-color: #dc3545;
    --warning-color: #ffb900;
    --border-color: #ddd;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Form Container */
.cgmp-form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.cgmp-form-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.cgmp-form-title {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* Form Groups */
.cgmp-form-group {
    margin-bottom: 20px;
}

.cgmp-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.cgmp-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.cgmp-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.cgmp-input::placeholder {
    color: #999;
}

.cgmp-error {
    display: block;
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

.cgmp-input.error {
    border-color: var(--danger-color);
}

/* Submit Button */
.cgmp-submit-button {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cgmp-submit-button:hover {
    background: var(--primary-dark);
}

.cgmp-submit-button:active {
    transform: scale(0.98);
}

.cgmp-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading State */
.cgmp-loading {
    text-align: center;
    color: var(--primary-color);
    font-weight: 500;
    display: none;
}

.cgmp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 115, 170, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: cgmp-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes cgmp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.cgmp-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.cgmp-success-text {
    margin: 0 0 15px 0;
    font-weight: 500;
}

/* Error Message */
.cgmp-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Referral Information */
.cgmp-referral-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: var(--primary-color);
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.cgmp-referral-notice {
    margin: 0;
}

/* Referral Box */
.cgmp-referral-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-top: 15px;
    border: 1px solid var(--border-color);
}

.cgmp-referral-label {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: var(--text-color);
}

.cgmp-referral-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.cgmp-referral-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    background: var(--white);
    cursor: text;
}

.cgmp-copy-button {
    padding: 10px 20px;
    background: var(--success-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.cgmp-copy-button:hover {
    background: #38a841;
}

.cgmp-referral-instruction {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #666;
}

/* Share Buttons */
.cgmp-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cgmp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.cgmp-share-btn:hover {
    transform: translateY(-2px);
}

.cgmp-whatsapp {
    background: #25d366;
    color: var(--white);
}

.cgmp-whatsapp:hover {
    background: #1faa52;
    color: var(--white);
}

/* Event Display (Read-only Event Info) */
.cgmp-event-display {
    background: var(--light-bg);
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.cgmp-event-info {
    margin: 0;
    color: var(--text-color);
    font-weight: 500;
}

.cgmp-event-date {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: normal;
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cgmp-form-container {
        margin: 20px 10px;
    }

    .cgmp-form-wrapper {
        padding: 20px;
    }

    .cgmp-form-title {
        font-size: 24px;
    }

    .cgmp-referral-link-container {
        flex-direction: column;
    }

    .cgmp-share-buttons {
        flex-direction: column;
    }

    .cgmp-share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Admin Styles */
.cgmp-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cgmp-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.cgmp-card-content h3 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cgmp-card-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.cgmp-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 12px;
}

.cgmp-badge-info {
    display: inline-block;
    padding: 4px 8px;
    background: var(--success-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 12px;
}

/* Tables */
.wp-list-table {
    background: var(--white);
    border-collapse: collapse;
}

.wp-list-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.wp-list-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.wp-list-table tr:hover {
    background: #f9f9f9;
}

/* Modal */
.cgmp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.cgmp-modal {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Utility Classes */
.cgmp-text-center {
    text-align: center;
}

.cgmp-mt-20 {
    margin-top: 20px;
}

.cgmp-mb-20 {
    margin-bottom: 20px;
}

.cgmp-p-20 {
    padding: 20px;
}