/**
 * Public CSS for Fahrlehrer Pro - Based on MVP Design
 */

/* Reset & Base */
* {
    box-sizing: border-box;
}

body.fhp-app-page {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0f172a;
    color: #111827;
    margin: 0;
    padding: 0;
}

/* App Container */
.fhp-app-container {
    max-width: 480px;
    margin: 1rem auto;
    min-height: calc(100vh - 2rem);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
    border: 1px solid #e5e7eb;
}

/* Hero Header */
.fhp-hero {
    position: relative;
    height: 150px;
    background-image: linear-gradient(120deg, #0f172a, #1d4ed8);
    color: white;
    display: flex;
    align-items: flex-end;
    padding: 1rem 1.2rem;
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
}

.fhp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://images.pexels.com/photos/210182/pexels-photo-210182.jpeg?auto=compress&cs=tinysrgb&w=800");
    background-size: cover;
    background-position: center;
    opacity: 0.32;
}

.fhp-hero-content {
    position: relative;
    z-index: 1;
}

.fhp-hero-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.fhp-hero-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0.2rem 0 0;
}

/* Main Content */
.fhp-app-main {
    flex: 1;
    padding: 1rem 1.2rem;
    overflow-y: auto;
    background: radial-gradient(circle at top left, #eff6ff, #f9fafb 45%, #ffffff 80%);
}

/* Cards */
.fhp-card {
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.fhp-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.fhp-card p {
    font-size: 0.85rem;
    color: #4b5563;
    margin: 0 0 0.3rem;
}

.fhp-card p:last-child {
    margin-bottom: 0;
}

/* Buttons */
.fhp-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.2s;
}

.fhp-btn:hover {
    background: #1d4ed8;
}

.fhp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fhp-btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.fhp-btn-secondary:hover {
    background: #d1d5db;
}

.fhp-btn-full {
    width: 100%;
}

.fhp-btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.fhp-btn-small + .fhp-btn-small {
    margin-left: 0.25rem;
}

.fhp-btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Form Groups */
.fhp-form-group {
    margin-bottom: 0.8rem;
}

.fhp-form-group label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    color: #374151;
    font-weight: 500;
}

.fhp-form-group input[type="text"],
.fhp-form-group input[type="email"],
.fhp-form-group input[type="password"],
.fhp-form-group input[type="date"],
.fhp-form-group input[type="number"],
.fhp-form-group select,
.fhp-form-group textarea {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border-radius: 0.6rem;
    border: 1px solid #d1d5db;
    font-size: 0.85rem;
    outline: none;
    background: #f9fafb;
    font-family: inherit;
}

.fhp-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.fhp-form-group input:focus,
.fhp-form-group select:focus,
.fhp-form-group textarea:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.fhp-form-group input[type="file"] {
    padding: 0.35rem 0.45rem;
    background: #ffffff;
}

.fhp-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.4rem;
}

/* List Items */
.fhp-list-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
}

.fhp-list-item:last-child {
    border-bottom: none;
}

.fhp-list-item-content {
    flex: 1;
}

.fhp-list-item-title {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.fhp-list-item-sub {
    font-size: 0.8rem;
    color: #6b7280;
}

.fhp-list-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

/* Badges */
.fhp-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.fhp-badge-green {
    background: #dcfce7;
    color: #166534;
}

.fhp-badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.fhp-badge-amber {
    background: #fef3c7;
    color: #92400e;
}

.fhp-badge-red {
    background: #fee2e2;
    color: #991b1b;
}

.fhp-badge-gray {
    background: #f3f4f6;
    color: #4b5563;
}

/* Labels */
.fhp-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 0.5rem;
}

/* Big Date */
.fhp-big-date {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0.3rem 0 0.5rem;
    color: #111827;
}

/* Progress Bar */
.fhp-progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.fhp-progress-bar {
    height: 100%;
    background: #2563eb;
    transition: width 0.3s;
}

.fhp-progress-bar.full {
    background: #16a34a;
}

/* Bottom Navigation */
.fhp-bottom-nav {
    display: flex;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.fhp-nav-item {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.2rem 0.7rem;
    font-size: 0.75rem;
    color: #6b7280;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: color 0.2s;
}

.fhp-nav-item:hover {
    color: #374151;
}

.fhp-nav-item-icon {
    font-size: 1.2rem;
    margin-bottom: 0.1rem;
}

.fhp-nav-item.active {
    color: #2563eb;
    font-weight: 600;
}

/* Messages */
.fhp-message {
    padding: 0.8rem 1rem;
    border-radius: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fhp-message-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.fhp-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.fhp-message-info {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Onboarding */
.fhp-onboarding {
    padding: 1rem 0;
}

.fhp-onboarding h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.fhp-onboarding p {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Deadline Widget */
.fhp-deadline-widget {
    margin-bottom: 1rem;
}

.fhp-deadline-widget strong {
    color: #111827;
}

/* Nachweis Text */
.fhp-nachweis-text {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    white-space: pre-wrap;
    font-family: monospace;
    margin: 0.5rem 0;
    max-height: 400px;
    overflow-y: auto;
}

/* Listings */
.fhp-listings-filters {
    margin-bottom: 1rem;
}

.fhp-listing-item {
    display: block;
}

/* Empty State */
.fhp-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
}

.fhp-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.fhp-empty-text {
    font-size: 0.9rem;
}

/* Certificate Link */
.fhp-cert-link {
    font-size: 0.78rem;
    margin-top: 0.2rem;
    color: #6b7280;
}

.fhp-cert-link a {
    color: #2563eb;
    text-decoration: none;
}

.fhp-cert-link a:hover {
    text-decoration: underline;
}

/* Admin Table */
.fhp-admin-table-header,
.fhp-admin-table-row {
    display: grid;
    grid-template-columns: 2.2fr 1.2fr 1fr 1.1fr;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.78rem;
}

.fhp-admin-table-header {
    font-weight: 600;
    color: #4b5563;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.3rem;
}

.fhp-admin-table-row {
    padding: 0.3rem 0;
    border-bottom: 1px solid #f3f4f6;
}

/* Partner Row */
.fhp-partner-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.fhp-partner-img {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.fhp-partner-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

/* Responsive */
@media (max-width: 560px) {
    .fhp-app-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
}

/* Loading */
.fhp-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

/* Tables for Fahrschule */
.fhp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.fhp-table th {
    text-align: left;
    padding: 0.5rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.fhp-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.fhp-table tr:last-child td {
    border-bottom: none;
}

/* WordPress alignment classes */
.alignleft {
    float: left;
    margin-right: 1rem;
}

.alignright {
    float: right;
    margin-left: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
