/* FlyerZone Portal - Public Styles */

:root {
    --fzp-primary: #2563eb;
    --fzp-primary-dark: #1d4ed8;
    --fzp-success: #10b981;
    --fzp-warning: #f59e0b;
    --fzp-danger: #ef4444;
    --fzp-gray-100: #f3f4f6;
    --fzp-gray-200: #e5e7eb;
    --fzp-gray-300: #d1d5db;
    --fzp-gray-600: #4b5563;
    --fzp-gray-800: #1f2937;
    --fzp-white: #ffffff;
    --fzp-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --fzp-shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --fzp-radius: 8px;
    --fzp-radius-lg: 12px;
}

/* Reset for plugin containers */
.fzp-container *,
.fzp-container *::before,
.fzp-container *::after {
    box-sizing: border-box;
}

.fzp-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--fzp-gray-800);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Messages */
.fzp-message {
    padding: 16px 20px;
    border-radius: var(--fzp-radius);
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fzp-message.fzp-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

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

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

/* Forms */
.fzp-form {
    background: var(--fzp-white);
    padding: 32px;
    border-radius: var(--fzp-radius-lg);
    box-shadow: var(--fzp-shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.fzp-form-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--fzp-gray-800);
}

.fzp-form-subtitle {
    color: var(--fzp-gray-600);
    margin-bottom: 24px;
    font-size: 16px;
}

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

.fzp-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--fzp-gray-800);
    font-size: 14px;
}

.fzp-form-group label .required {
    color: var(--fzp-danger);
    margin-left: 4px;
}

.fzp-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--fzp-gray-200);
    border-radius: var(--fzp-radius);
    font-size: 15px;
    transition: all 0.2s;
    background: var(--fzp-white);
    color: var(--fzp-gray-800);
}

.fzp-form-control:focus {
    outline: none;
    border-color: var(--fzp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.fzp-form-control::placeholder {
    color: var(--fzp-gray-300);
}

textarea.fzp-form-control {
    min-height: 120px;
    resize: vertical;
}

select.fzp-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Buttons */
.fzp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--fzp-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.fzp-btn-primary:hover {
    background: var(--fzp-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.fzp-btn-secondary {
    background: var(--fzp-gray-100);
    color: var(--fzp-gray-800);
}

.fzp-btn-secondary:hover {
    background: var(--fzp-gray-200);
}

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

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

.fzp-btn-outline {
    background: transparent;
    border: 2px solid var(--fzp-gray-300);
    color: var(--fzp-gray-600);
}

.fzp-btn-outline:hover {
    border-color: var(--fzp-primary);
    color: var(--fzp-primary);
}

.fzp-btn-block {
    width: 100%;
}

.fzp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Dashboard */
.fzp-dashboard {
    display: grid;
    gap: 24px;
}

.fzp-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
}

.fzp-dashboard-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--fzp-gray-800);
    margin: 0;
}

.fzp-dashboard-subtitle {
    color: var(--fzp-gray-600);
    font-size: 16px;
}

/* Stats Cards */
.fzp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.fzp-stat-card {
    background: var(--fzp-white);
    padding: 24px;
    border-radius: var(--fzp-radius-lg);
    box-shadow: var(--fzp-shadow);
    border-left: 4px solid var(--fzp-primary);
    transition: transform 0.2s;
}

.fzp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fzp-shadow-lg);
}

.fzp-stat-card.pending { border-left-color: var(--fzp-warning); }
.fzp-stat-card.approved { border-left-color: var(--fzp-success); }
.fzp-stat-card.rejected { border-left-color: var(--fzp-danger); }

.fzp-stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--fzp-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.fzp-stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--fzp-gray-800);
    line-height: 1;
}

/* Programs Grid */
.fzp-programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.fzp-program-card {
    background: var(--fzp-white);
    border-radius: var(--fzp-radius-lg);
    overflow: hidden;
    box-shadow: var(--fzp-shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.fzp-program-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fzp-shadow-lg);
}

.fzp-program-image {
    height: 180px;
    background: linear-gradient(135deg, var(--fzp-primary) 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fzp-white);
    font-size: 48px;
}

.fzp-program-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fzp-program-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--fzp-gray-800);
}

.fzp-program-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.fzp-program-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--fzp-gray-100);
    color: var(--fzp-gray-600);
}

.fzp-program-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.fzp-program-description {
    color: var(--fzp-gray-600);
    margin-bottom: 16px;
    flex: 1;
    line-height: 1.6;
}

.fzp-program-footer {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

/* Applications Table */
.fzp-table-container {
    background: var(--fzp-white);
    border-radius: var(--fzp-radius-lg);
    box-shadow: var(--fzp-shadow);
    overflow: hidden;
}

.fzp-table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--fzp-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.fzp-table-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.fzp-table-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fzp-table {
    width: 100%;
    border-collapse: collapse;
}

.fzp-table th,
.fzp-table td {
    padding: 16px 24px;
    text-align: left;
}

.fzp-table th {
    background: var(--fzp-gray-100);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fzp-gray-600);
    border-bottom: 2px solid var(--fzp-gray-200);
}

.fzp-table tbody tr {
    border-bottom: 1px solid var(--fzp-gray-200);
    transition: background 0.2s;
}

.fzp-table tbody tr:hover {
    background: var(--fzp-gray-100);
}

.fzp-table tbody tr:last-child {
    border-bottom: none;
}

/* Status Badges */
.fzp-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
}

.fzp-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.fzp-status.pending {
    background: #fef3c7;
    color: #92400e;
}
.fzp-status.pending::before { background: var(--fzp-warning); }

.fzp-status.approved {
    background: #d1fae5;
    color: #065f46;
}
.fzp-status.approved::before { background: var(--fzp-success); }

.fzp-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}
.fzp-status.rejected::before { background: var(--fzp-danger); }

.fzp-status.under_review {
    background: #dbeafe;
    color: #1e40af;
}
.fzp-status.under_review::before { background: var(--fzp-primary); }

/* User Info */
.fzp-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fzp-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fzp-primary), #3b82f6);
    color: var(--fzp-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.fzp-user-details {
    display: flex;
    flex-direction: column;
}

.fzp-user-name {
    font-weight: 600;
    color: var(--fzp-gray-800);
}

.fzp-user-email {
    font-size: 13px;
    color: var(--fzp-gray-600);
}

/* Empty State */
.fzp-empty {
    text-align: center;
    padding: 60px 20px;
}

.fzp-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.fzp-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fzp-gray-800);
    margin-bottom: 8px;
}

.fzp-empty-text {
    color: var(--fzp-gray-600);
    max-width: 400px;
    margin: 0 auto 24px;
}

/* Modal */
.fzp-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: 9999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.fzp-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.fzp-modal {
    background: var(--fzp-white);
    border-radius: var(--fzp-radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.fzp-modal-overlay.active .fzp-modal {
    transform: scale(1);
}

.fzp-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--fzp-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fzp-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.fzp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--fzp-gray-600);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.fzp-modal-close:hover {
    background: var(--fzp-gray-100);
    color: var(--fzp-gray-800);
}

.fzp-modal-body {
    padding: 32px;
}

.fzp-modal-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--fzp-gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Application Detail */
.fzp-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.fzp-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fzp-detail-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fzp-gray-600);
}

.fzp-detail-value {
    font-size: 15px;
    color: var(--fzp-gray-800);
    font-weight: 500;
}

.fzp-detail-full {
    grid-column: 1 / -1;
}

/* Loading */
.fzp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--fzp-gray-200);
    border-top-color: var(--fzp-primary);
    border-radius: 50%;
    animation: fzp-spin 1s linear infinite;
}

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

.fzp-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .fzp-container {
        padding: 12px;
    }

    .fzp-form {
        padding: 20px;
    }

    .fzp-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .fzp-programs-grid {
        grid-template-columns: 1fr;
    }

    .fzp-table-container {
        overflow-x: auto;
    }

    .fzp-table {
        min-width: 600px;
    }

    .fzp-detail-grid {
        grid-template-columns: 1fr;
    }

    .fzp-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
}

/* Login/Register specific */
.fzp-auth-container {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.fzp-auth-box {
    width: 100%;
    max-width: 480px;
}

.fzp-auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.fzp-auth-logo h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--fzp-gray-800);
    margin-bottom: 8px;
}

.fzp-auth-logo p {
    color: var(--fzp-gray-600);
    font-size: 16px;
}

.fzp-auth-links {
    text-align: center;
    margin-top: 24px;
    color: var(--fzp-gray-600);
}

.fzp-auth-links a {
    color: var(--fzp-primary);
    text-decoration: none;
    font-weight: 600;
}

.fzp-auth-links a:hover {
    text-decoration: underline;
}

/* Navigation */
.fzp-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--fzp-gray-200);
    padding-bottom: 0;
}

.fzp-nav-item {
    padding: 12px 20px;
    border: none;
    background: none;
    color: var(--fzp-gray-600);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-size: 14px;
}

.fzp-nav-item:hover {
    color: var(--fzp-primary);
}

.fzp-nav-item.active {
    color: var(--fzp-primary);
    border-bottom-color: var(--fzp-primary);
}

/* Section */
.fzp-section {
    display: none;
}

.fzp-section.active {
    display: block;
    animation: fzp-fadeIn 0.3s ease;
}

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

/* Quick Actions */
.fzp-quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Search */
.fzp-search {
    position: relative;
}

.fzp-search input {
    padding-left: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}

/* Select filter */
.fzp-filter-select {
    min-width: 140px;
}

/* Timeline for application history */
.fzp-timeline {
    position: relative;
    padding-left: 32px;
}

.fzp-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--fzp-gray-200);
}

.fzp-timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.fzp-timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--fzp-primary);
    border: 2px solid var(--fzp-white);
    box-shadow: 0 0 0 2px var(--fzp-primary);
}

.fzp-timeline-date {
    font-size: 13px;
    color: var(--fzp-gray-600);
    margin-bottom: 4px;
}

.fzp-timeline-content {
    background: var(--fzp-gray-100);
    padding: 12px 16px;
    border-radius: var(--fzp-radius);
    font-size: 14px;
}

/* Print styles */
@media print {
    .fzp-btn,
    .fzp-nav,
    .fzp-modal-overlay,
    .fzp-quick-actions {
        display: none !important;
    }

    .fzp-container {
        max-width: 100%;
        padding: 0;
    }
}
