/**
 * EventTable Pro Public Styles
 */

/* Reset & Base */
.etp-public {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1F2937;
    line-height: 1.6;
}

.etp-public * {
    box-sizing: border-box;
}

/* Header */
.etp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.etp-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.etp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6B7280;
    text-decoration: none;
    margin-bottom: 10px;
}

.etp-back-link:hover {
    color: #3B82F6;
}

/* Buttons */
.etp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: #F3F4F6;
    color: #374151;
    transition: all 0.2s;
}

.etp-btn:hover {
    background: #E5E7EB;
}

.etp-btn-primary {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
}

.etp-btn-primary:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
}

.etp-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.etp-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.etp-btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

.etp-btn-icon {
    padding: 6px 8px;
}

.etp-btn-danger:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* Cards */
.etp-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Events Grid */
.etp-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.etp-event-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.etp-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.etp-event-past {
    opacity: 0.7;
}

.etp-event-type-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.etp-event-content {
    padding: 24px;
}

.etp-event-content h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.etp-event-meta {
    color: #6B7280;
    font-size: 14px;
}

.etp-event-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.etp-event-stats {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.etp-stat {
    text-align: center;
}

.etp-stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
}

.etp-stat-label {
    font-size: 12px;
    color: #9CA3AF;
}

.etp-event-actions {
    padding: 16px 24px;
    background: #F9FAFB;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Stats Bar */
.etp-stats-bar {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.etp-stat-item {
    text-align: center;
}

.etp-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
}

.etp-stat-item.etp-stat-success .etp-stat-value {
    color: #10B981;
}

.etp-stat-item.etp-stat-warning .etp-stat-value {
    color: #F59E0B;
}

/* Toolbar */
.etp-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Tables */
.etp-table {
    width: 100%;
    border-collapse: collapse;
}

.etp-table th,
.etp-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.etp-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: #6B7280;
    font-size: 12px;
    text-transform: uppercase;
}

.etp-table tbody tr:hover {
    background: #F9FAFB;
}

.etp-actions-cell {
    white-space: nowrap;
}

/* Status badges */
.etp-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.etp-status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.etp-status-confirmed {
    background: #D1FAE5;
    color: #065F46;
}

.etp-status-declined {
    background: #FEE2E2;
    color: #991B1B;
}

.etp-status-maybe {
    background: #E0E7FF;
    color: #3730A3;
}

/* Forms */
.etp-form .etp-field {
    margin-bottom: 20px;
}

.etp-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.etp-form input[type="text"],
.etp-form input[type="email"],
.etp-form input[type="tel"],
.etp-form input[type="number"],
.etp-form input[type="password"],
.etp-form input[type="date"],
.etp-form input[type="datetime-local"],
.etp-form select,
.etp-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.etp-form input:focus,
.etp-form select:focus,
.etp-form textarea:focus {
    outline: none;
    border-color: #3B82F6;
}

.etp-form .required {
    color: #EF4444;
}

.etp-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #E5E7EB;
}

.etp-form-section h2 {
    margin: 0 0 20px;
    font-size: 18px;
}

.etp-form-actions {
    margin-top: 30px;
}

.etp-hint {
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 4px;
}

/* Grid */
.etp-row {
    display: flex;
    gap: 20px;
}

.etp-col-6 {
    flex: 1;
}

@media (max-width: 640px) {
    .etp-row {
        flex-direction: column;
    }
}

/* Modal */
.etp-modal {
    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: 100000;
    padding: 20px;
}

.etp-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.etp-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 28px;
    cursor: pointer;
    color: #9CA3AF;
    line-height: 1;
}

.etp-modal-close:hover {
    color: #374151;
}

.etp-modal h2 {
    margin: 0 0 24px;
}

.etp-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

/* Empty state */
.etp-empty-state {
    text-align: center;
    padding: 80px 20px;
}

.etp-empty-icon {
    font-size: 72px;
    color: #D1D5DB;
    margin-bottom: 20px;
}

.etp-empty-state h2 {
    margin: 0 0 12px;
    color: #374151;
}

.etp-empty-state p {
    color: #6B7280;
    margin-bottom: 24px;
}

.etp-empty-sm {
    padding: 40px 20px;
}

.etp-empty-text {
    color: #9CA3AF;
    text-align: center;
    padding: 20px;
}

/* Notices */
.etp-notice {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.etp-notice-error {
    background: #FEE2E2;
    color: #991B1B;
}

.etp-notice-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.etp-notice-warning {
    background: #FEF3C7;
    color: #92400E;
}

/* Auth pages */
.etp-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.etp-auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.etp-auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.etp-auth-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.etp-auth-header p {
    color: #6B7280;
    margin: 0;
}

.etp-auth-footer {
    text-align: center;
    margin-top: 24px;
    color: #6B7280;
}

.etp-auth-footer a {
    color: #3B82F6;
}

.etp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
}

.etp-login-required {
    text-align: center;
    padding: 60px 20px;
}

/* Seating Chart */
.etp-seating-layout {
    display: flex;
    gap: 24px;
}

.etp-canvas-wrapper {
    flex: 1;
    background: #F9FAFB;
    border-radius: 12px;
    min-height: 600px;
    position: relative;
    overflow: auto;
}

.etp-floor-plan {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.3;
    pointer-events: none;
}

.etp-canvas {
    position: relative;
    width: 100%;
    height: 600px;
}

.etp-table {
    position: absolute;
    width: 100px;
    height: 100px;
    background: #3B82F6;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: move;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: transform 0.1s;
}

.etp-table.dragging {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
    z-index: 100;
}

.etp-table.drop-target {
    background: #10B981;
}

.etp-table-round {
    border-radius: 50%;
}

.etp-table-square {
    border-radius: 12px;
}

.etp-table-rectangle {
    width: 150px;
    height: 80px;
    border-radius: 40px;
}

.etp-table-name {
    font-weight: 600;
    font-size: 14px;
}

.etp-table-count {
    font-size: 12px;
    opacity: 0.9;
}

.etp-guests-panel {
    width: 280px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-height: 600px;
    overflow-y: auto;
}

.etp-guests-panel h3 {
    margin: 0 0 16px;
    font-size: 16px;
}

.etp-guest-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #F3F4F6;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: grab;
    transition: background 0.2s;
}

.etp-guest-chip:hover {
    background: #E5E7EB;
}

.etp-guest-chip.dragging {
    opacity: 0.5;
}

.etp-guest-name {
    flex: 1;
    font-weight: 500;
}

.etp-guest-size {
    color: #6B7280;
    font-size: 13px;
}

@media (max-width: 900px) {
    .etp-seating-layout {
        flex-direction: column;
    }

    .etp-guests-panel {
        width: 100%;
    }
}