/* Rubei WP Plugin Styles */

/* Reset and base styles */
.rubei-wp-dashboard * {
    box-sizing: border-box;
}

/* Login styles */
.rubei-wp-login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #fef2f2 0%, #fed7aa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rubei-wp-login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.rubei-wp-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.rubei-wp-login-header h1 {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.rubei-wp-login-header h2 {
    font-size: 16px;
    color: #dc2626;
    margin: 0;
    font-weight: normal;
}

.rubei-wp-form-group {
    margin-bottom: 24px;
}

.rubei-wp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.rubei-wp-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.rubei-wp-form-group input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.rubei-wp-login-button {
    width: 100%;
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rubei-wp-login-button:hover {
    background: #b91c1c;
}

.rubei-wp-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Dashboard styles */
.rubei-wp-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    background: #f9fafb;
    min-height: 100vh;
    padding: 24px;
}

.rubei-wp-header {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rubei-wp-title h1 {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.rubei-wp-title h2 {
    font-size: 16px;
    color: #dc2626;
    margin: 0;
    font-weight: normal;
}

.rubei-wp-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
}

.rubei-wp-logout-button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.rubei-wp-logout-button:hover {
    background: #b91c1c;
}

/* Tabs */
.rubei-wp-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.rubei-wp-tab-button {
    background: #f3f4f6;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
}

.rubei-wp-tab-button:hover {
    background: #e5e7eb;
}

.rubei-wp-tab-button.active {
    background: #dc2626;
    color: white;
}

.rubei-wp-tab-panel {
    display: none;
}

.rubei-wp-tab-panel.active {
    display: block;
}

/* Content panels */
.rubei-wp-content-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 24px;
}

.rubei-wp-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

/* Forms */
.rubei-wp-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.rubei-wp-form-field {
    display: flex;
    flex-direction: column;
}

.rubei-wp-form-field label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.rubei-wp-form-field input,
.rubei-wp-form-field select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.rubei-wp-form-field input:focus,
.rubei-wp-form-field select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.rubei-wp-button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.rubei-wp-button:hover {
    background: #b91c1c;
}

.rubei-wp-button.secondary {
    background: #6b7280;
}

.rubei-wp-button.secondary:hover {
    background: #4b5563;
}

.rubei-wp-button.success {
    background: #059669;
}

.rubei-wp-button.success:hover {
    background: #047857;
}

/* Grid layouts */
.rubei-wp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.rubei-wp-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.rubei-wp-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Calendar styles */
.rubei-wp-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #e5e7eb;
    padding: 8px;
    border-radius: 8px;
}

.rubei-wp-calendar-day {
    background: white;
    padding: 12px;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.rubei-wp-calendar-day:hover {
    background: #f3f4f6;
}

.rubei-wp-calendar-day.weekend {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.rubei-wp-calendar-day.holiday {
    background: #fef3c7 !important;
    color: #92400e !important;
    cursor: not-allowed !important;
    opacity: 0.8 !important;
}

.rubei-wp-calendar-day.urlaub {
    background: #dbeafe;
    color: #1e40af;
}

.rubei-wp-calendar-day.krank {
    background: #fee2e2;
    color: #991b1b;
}

.rubei-wp-calendar-day.kein-entgelt {
    background: #f3e8ff;
    color: #7c3aed;
}

.rubei-wp-calendar-day.office {
    background: #f3f4f6;
    border: 2px solid #9ca3af;
}

.rubei-wp-calendar-day.local {
    background: #dcfce7;
    border: 2px solid #22c55e;
}

.rubei-wp-calendar-day.deployment {
    background: #fed7aa;
    border: 2px solid #ea580c;
}

.rubei-wp-calendar-day-number {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
}

.rubei-wp-calendar-day-info {
    font-size: 12px;
    line-height: 1.2;
}

/* Modal styles */
.rubei-wp-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: 1000;
    padding: 20px;
}

.rubei-wp-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.rubei-wp-modal-header {
    padding: 20px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rubei-wp-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.rubei-wp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rubei-wp-modal-close:hover {
    color: #374151;
}

.rubei-wp-modal-body {
    padding: 20px 24px;
}

.rubei-wp-modal-footer {
    padding: 0 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Calendar legend */
.rubei-wp-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.rubei-wp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.rubei-wp-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
}

.rubei-wp-legend-color.holiday {
    background: #fef3c7;
    border-color: #f59e0b;
}

.rubei-wp-legend-color.weekend {
    background: #f9fafb;
    border-color: #9ca3af;
}

.rubei-wp-legend-color.urlaub {
    background: #dbeafe;
    border-color: #3b82f6;
}

.rubei-wp-legend-color.krank {
    background: #fee2e2;
    border-color: #ef4444;
}

.rubei-wp-legend-color.kein-entgelt {
    background: #f3e8ff;
    border-color: #8b5cf6;
}

.rubei-wp-legend-color.office {
    background: #f3f4f6;
    border-color: #6b7280;
}

.rubei-wp-legend-color.local {
    background: #dcfce7;
    border-color: #22c55e;
}

.rubei-wp-legend-color.deployment {
    background: #fed7aa;
    border-color: #ea580c;
}

.rubei-wp-legend-color.has-planning {
    background: #dcfce7;
    border-color: #22c55e;
}

.rubei-wp-legend-color.workday {
    background: white;
    border-color: #d1d5db;
}

/* Calendar headers */
.rubei-wp-calendar-header {
    background: #f3f4f6;
    padding: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

/* Stats grid */
.rubei-wp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.rubei-wp-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.rubei-wp-stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
}

.rubei-wp-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 4px;
}

.rubei-wp-stat-subtitle {
    font-size: 12px;
    color: #6b7280;
}

/* Card headers and actions */
.rubei-wp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rubei-wp-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.rubei-wp-card-actions {
    display: flex;
    gap: 4px;
}

.rubei-wp-card-actions button {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.rubei-wp-card-actions button:hover {
    background: #f3f4f6;
}

.rubei-wp-card-body p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #374151;
}

.rubei-wp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.rubei-wp-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.rubei-wp-tag.work-type-construction {
    background: #fed7aa;
    color: #92400e;
}

.rubei-wp-tag.work-type-office {
    background: #dbeafe;
    color: #1e40af;
}

.rubei-wp-tag.work-type-lager {
    background: #f3e8ff;
    color: #7c3aed;
}

.rubei-wp-tag.employment-type-fulltime {
    background: #dcfce7;
    color: #166534;
}

.rubei-wp-tag.employment-type-teilzeit {
    background: #fef3c7;
    color: #92400e;
}

/* Public container styles */
.rubei-wp-public-container {
    min-height: 100vh;
    background: #f9fafb;
    padding: 20px;
}

.rubei-wp-login-footer,
.rubei-wp-footer {
    text-align: center;
    margin-top: 24px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.rubei-wp-login-footer a,
.rubei-wp-footer a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.rubei-wp-login-footer a:hover,
.rubei-wp-footer a:hover {
    text-decoration: underline;
}

/* Fix for calendar display issues */
.rubei-wp-calendar {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    background: #e5e7eb !important;
    padding: 8px !important;
    border-radius: 8px !important;
    min-height: 400px !important;
    margin-bottom: 20px !important;
}

/* Ensure calendar headers are visible */
.rubei-wp-calendar-header {
    background: #f3f4f6 !important;
    padding: 12px 8px !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.rubei-wp-calendar-day {
    background: white !important;
    padding: 12px !important;
    min-height: 80px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    position: relative !important;
    border: 1px solid #e5e7eb !important;
}

.rubei-wp-calendar-day.empty {
    background: #f9fafb !important;
    cursor: default !important;
}

.rubei-wp-calendar-day:hover:not(.empty) {
    background: #f3f4f6 !important;
}

.rubei-wp-calendar-header {
    background: #f3f4f6 !important;
    padding: 8px !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
}

/* Fix for form elements */
.rubei-wp-form-field select,
.rubei-wp-form-field input {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: white !important;
}

.rubei-wp-form-field select:focus,
.rubei-wp-form-field input:focus {
    outline: none !important;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* Fix for buttons */
.rubei-wp-button {
    background: #dc2626 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.rubei-wp-button:hover {
    background: #b91c1c !important;
}

.rubei-wp-button.secondary {
    background: #6b7280 !important;
}

.rubei-wp-button.secondary:hover {
    background: #4b5563 !important;
}

.rubei-wp-button.success {
    background: #059669 !important;
}

.rubei-wp-button.success:hover {
    background: #047857 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .rubei-wp-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .rubei-wp-tabs {
        flex-wrap: wrap;
    }
    
    .rubei-wp-form-row {
        grid-template-columns: 1fr;
    }
    
    .rubei-wp-grid {
        grid-template-columns: 1fr;
    }
    
    .rubei-wp-calendar {
        grid-template-columns: repeat(7, 1fr);
        font-size: 12px;
    }
    
    .rubei-wp-calendar-day {
        padding: 8px;
        min-height: 60px;
    }
    
    .rubei-wp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rubei-wp-calendar-legend {
        flex-direction: column;
        gap: 8px;
    }
    
    .rubei-wp-public-container {
        padding: 10px;
    }
}
