/* Admin-Bereich Styles */

/* Feedback-Elemente */
.save-feedback {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.save-feedback.success {
    background-color: #28a745;
}

.save-feedback.warning {
    background-color: #ffc107;
    color: #333;
}

.save-feedback.error {
    background-color: #dc3545;
}

.save-feedback.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--primary-color);
    margin: 0;
    font-size: 2rem;
}

.login-header p {
    margin: 0.5rem 0 0;
    color: #666;
}

.login-form-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
}

.login-form-container h2 {
    margin: 0 0 1.5rem;
    text-align: center;
    color: var(--primary-color);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(201, 168, 117, 0.2);
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.admin-header {
    background-color: var(--secondary-color);
    background-size: cover;
    background-position: center;
    color: var(--light-color);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.admin-header h1 {
    color: var(--light-color);
    margin-bottom: 0.5rem;
}

.admin-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.hidden {
    display: none;
}

.admin-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
}

.stat-content h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.stat-content p {
    margin: 0.25rem 0 0;
    font-size: 1.25rem;
    font-weight: bold;
}

.export-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.guest-list-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.guest-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: #f5f5f5;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.guest-list {
    max-height: 500px;
    overflow-y: auto;
}

.guest-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
    transition: background-color 0.2s;
}

.guest-item:hover {
    background-color: #f9f9f9;
}

.guest-name {
    font-weight: 500;
}

.guest-status, .guest-winery {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge.attending {
    background-color: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
}

.status-badge.not-attending {
    background-color: rgba(244, 67, 54, 0.15);
    color: #c62828;
}

.status-badge.winery-yes {
    background-color: rgba(156, 39, 176, 0.15);
    color: #7b1fa2;
}

.status-badge.winery-no {
    background-color: rgba(96, 125, 139, 0.15);
    color: #455a64;
}

.guest-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn.edit {
    background-color: #2196F3;
    color: white;
}

.action-btn.delete {
    background-color: #f44336;
    color: white;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-header {
    margin: -2rem -2rem 2rem -2rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.choice-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--primary-color);
}

.choice-btn:hover {
    background: rgba(201, 168, 117, 0.1);
}

.choice-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.choice-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}

.choice-btn.disabled:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.choice-btn.disabled.active {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #b18d5a;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.companions-list {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0.25rem 2rem;
    padding-left: 1rem;
    border-left: 1px solid #ddd;
    font-size: 0.9rem;
    color: #666;
}

.companion-item {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.5rem 0;
    align-items: center;
}

.companion-item:not(:last-child) {
    border-bottom: 1px dotted #eee;
}

.companion-name {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
}

.companion-name i {
    font-size: 0.8rem;
    color: #999;
}

.companion-winery {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.companion-winery i {
    font-size: 0.8rem;
}

.delete-companion {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    color: #999;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.delete-companion:hover {
    background-color: #ffebee;
    color: #f44336;
    border-color: #f44336;
}

.action-btn.add-companion {
    background-color: #fff;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.action-btn.add-companion:hover {
    background-color: #4CAF50;
    color: white;
}

@media (max-width: 768px) {
    .login-container {
        padding: 0 1rem;
    }

    .login-form-container {
        padding: 1.5rem;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .guest-list-header,
    .guest-item {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        min-width: 600px;
    }

    .export-container {
        flex-direction: column;
    }

    .export-container .btn {
        width: 100%;
    }

    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    .modal-header {
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        padding: 1rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }

    .button-group {
        flex-direction: row;
    }

    .companions-list {
        padding-left: 1rem;
    }

    .companion-item {
        grid-template-columns: 1.5fr 1fr auto;
        min-width: calc(600px - 2rem);
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 1.75rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .stat-box {
        padding: 0.75rem;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }

    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .status-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}
