/**
 * Frontend Styles for Laravel Event Connector
 */

/* Container Styles */
.lec-registration-form-container,
.lec-event-list-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Form Header */
.lec-form-header {
    text-align: center;
    margin-bottom: 30px;
}

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

/* Form Styles */
.lec-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lec-form-group {
    margin-bottom: 20px;
}

.lec-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.lec-form-group label .required {
    color: #e74c3c;
}

.lec-form-group input[type="text"],
.lec-form-group input[type="email"],
.lec-form-group input[type="tel"],
.lec-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.lec-form-group input:focus,
.lec-form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Form Row (for side-by-side fields) */
.lec-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.lec-form-row .lec-form-group {
    margin-bottom: 0;
}

.lec-form-group.lec-half {
    flex: 1;
}

/* Event Details */
.lec-event-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
    display: none;
}

.lec-selected-event-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.lec-selected-event-details strong {
    color: #333;
}

/* Submit Button */
.lec-form-actions {
    margin-top: 30px;
    text-align: center;
}

.lec-submit-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.lec-submit-btn:hover {
    background: #45a049;
}

.lec-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading Indicator */
.lec-form-loading {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.lec-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Messages */
#lec-message-container {
    margin-bottom: 20px;
}

.lec-message {
    position: relative;
    padding: 15px 40px 15px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.lec-message p {
    margin: 0;
}

.lec-message-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.lec-message-close:hover {
    opacity: 1;
}

.lec-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.lec-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Event List Styles */
.lec-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.lec-event-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.lec-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.lec-event-name {
    color: #333;
    font-size: 20px;
    margin: 0 0 10px 0;
}

.lec-event-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.lec-event-meta {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.lec-event-meta > div {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.lec-event-actions {
    margin-top: 15px;
    text-align: center;
}

.lec-register-btn {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.lec-register-btn:hover {
    background: #45a049;
    text-decoration: none;
}

.lec-event-full {
    display: inline-block;
    background: #f44336;
    color: white;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 600;
}

.lec-no-events {
    text-align: center;
    color: #666;
    font-size: 16px;
    padding: 40px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lec-form-row {
        flex-direction: column;
        gap: 0;
    }

    .lec-form-row .lec-form-group {
        margin-bottom: 20px;
    }

    .lec-events-grid {
        grid-template-columns: 1fr;
    }

    .lec-form {
        padding: 20px;
    }
}

/* Admin Styles */
.lec-info-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-top: 30px;
}

.lec-info-box h2,
.lec-info-box h3 {
    margin-top: 20px;
}

.lec-info-box h2:first-child {
    margin-top: 0;
}

.lec-info-box ul {
    list-style-type: disc;
    padding-left: 30px;
}

.lec-info-box code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.lec-test-connection {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}
