/**
 * Beetle Conventions Manager - Styles
 * Styles for convention listings and admin interface
 * Works with conventions-manager.php
 */

/* ==========================================================================
   Container & Layout
   ========================================================================== */

.beetle-conventions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ==========================================================================
   Admin Controls
   ========================================================================== */

.admin-controls {
    margin-bottom: 30px;
    text-align: right;
}

.beetle-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    display: inline-block;
}

.beetle-btn-primary {
    background: #2c7a3f;
    color: white;
}

.beetle-btn-primary:hover {
    background: #235f32;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 122, 63, 0.3);
}

.beetle-btn-secondary {
    background: #6c757d;
    color: white;
}

.beetle-btn-secondary:hover {
    background: #5a6268;
}

.beetle-btn-danger {
    background: #dc3545;
    color: white;
}

.beetle-btn-danger:hover {
    background: #c82333;
}

/* ==========================================================================
   Conventions List
   ========================================================================== */

.conventions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
    grid-auto-flow: dense;
}

.no-conventions {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 18px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

/* ==========================================================================
   Convention Card
   ========================================================================== */

.convention-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.convention-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Status-based border colors */
.convention-card.status-aanwezig {
    border-color: #28a745;
}

.convention-card.status-afwezig {
    border-color: #0073aa;
}

/* ==========================================================================
   Date Badge
   ========================================================================== */

.convention-date-badge {
    background: linear-gradient(135deg, #2c7a3f 0%, #1e5a2d 100%);
    color: white;
    padding: 12px 15px;
    text-align: center;
    position: relative;
}

.date-day {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 3px;
}

.date-month {
    font-size: 13px;
    text-transform: capitalize;
    opacity: 0.95;
    font-weight: 500;
}

/* ==========================================================================
   Convention Content
   ========================================================================== */

.convention-content {
    padding: 16px;
}

.convention-header {
    margin-bottom: 12px;
}

.convention-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.convention-weekday {
    font-size: 14px;
    color: #6c757d;
    text-transform: capitalize;
}

/* ==========================================================================
   Convention Details
   ========================================================================== */

.convention-details {
    margin-top: 15px;
}

.detail-row {
    margin-bottom: 8px;
    color: #495057;
    line-height: 1.5;
    font-size: 15px;
}

.detail-row.venue strong {
    color: #2c3e50;
    font-size: 16px;
}

.detail-row.address {
    color: #6c757d;
}

.detail-row.parking {
    font-size: 14px;
    color: #495057;
}

.detail-row.parking a {
    color: #2c7a3f;
    text-decoration: none;
    font-weight: 600;
}

.detail-row.parking a:hover {
    text-decoration: underline;
}

.detail-row.website {
    margin-top: 8px;
}

.detail-row.website a {
    color: #2c7a3f;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.detail-row.website a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Convention Status Badge
   ========================================================================== */

.convention-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.convention-status.status-aanwezig {
    background: #d4edda;
    color: #155724;
}

.convention-status.status-afwezig {
    background: #f8d7da;
    color: #721c24;
}

/* ==========================================================================
   Admin Actions (Edit/Delete buttons)
   ========================================================================== */

.admin-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.btn-edit,
.btn-delete {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
	padding: 0;
    line-height: 0;
}

.btn-edit:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.btn-delete:hover {
    background: #ffe5e5;
    transform: scale(1.1);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.convention-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #6c757d;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #dc3545;
}

.modal-content h2 {
    margin: 0;
    padding: 25px 30px;
    background: linear-gradient(135deg, #2c7a3f 0%, #1e5a2d 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    font-size: 24px;
    font-weight: 700;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

#convention-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c7a3f;
    box-shadow: 0 0 0 3px rgba(44, 122, 63, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* ==========================================================================
   Form Actions
   ========================================================================== */

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.form-actions .beetle-btn {
    min-width: 120px;
}

/* ==========================================================================
   Loading Indicator
   ========================================================================== */

.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c7a3f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Messages
   ========================================================================== */

.convention-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.convention-message-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.convention-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .conventions-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    #convention-form {
        padding: 20px;
    }

    .convention-title {
        font-size: 20px;
    }

    .date-day {
        font-size: 42px;
    }

    .admin-controls {
        text-align: center;
    }

    .beetle-btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .beetle-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .beetle-conventions-container {
        padding: 15px;
    }

    .convention-content {
        padding: 15px;
    }

    .date-day {
        font-size: 36px;
    }

    .convention-title {
        font-size: 18px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .admin-controls,
    .admin-actions,
    .convention-modal,
    .loading-indicator {
        display: none !important;
    }

    .convention-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .conventions-list {
        gap: 15px;
    }
}