/*
 * LCC Company Portal - PayPal Professional Theme
 * Version 2.0
 * Following PayPal Branding Guide - Clean, Professional, Trustworthy
 */

/* Import shared admin styles */
@import url('admin-dashboard.css');

/* ============================================
   COMPANY PORTAL SPECIFIC OVERRIDES
   ============================================ */

.login-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.link {
    color: var(--paypal-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* ============================================
   COMPANY SPECIFIC BADGES
   ============================================ */

.license-badge {
    background-color: rgba(0, 112, 186, 0.1);
    color: var(--paypal-light-blue);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   FORM SPECIFIC STYLES
   ============================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
}

.form-control {
    width: 100%;
}

/* ============================================
   DYNAMIC FORM FIELDS
   ============================================ */

#dynamic-fields {
    padding: var(--spacing-lg) 0;
}

#dynamic-fields .form-grid {
    margin-bottom: var(--spacing-lg);
}

.field-section {
    margin-bottom: var(--spacing-xl);
}

.field-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--paypal-blue);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-light);
}

/* ============================================
   REPORT STATUS DISPLAY
   ============================================ */

.report-status-card {
    background-color: var(--light-gray);
    border-left: 4px solid var(--paypal-blue);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-sm);
}

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

.report-status-card .status-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark-gray);
    margin-top: var(--spacing-xs);
}

/* ============================================
   MODAL SIZES
   ============================================ */

.modal-large {
    max-width: 800px;
}

/* ============================================
   FILTER GRID FOR COMPANY PORTAL
   ============================================ */

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md);
}

/* ============================================
   TABLE ENHANCEMENTS
   ============================================ */

.data-table small {
    color: var(--medium-gray);
    font-size: 12px;
}

/* ============================================
   FORM VALIDATION STYLES
   ============================================ */

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

.form-group input:valid:not(:placeholder-shown),
.form-group select:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

/* ============================================
   REPORT DETAIL IN MODAL
   ============================================ */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.detail-item label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--medium-gray);
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
}

.detail-item .value {
    font-size: 14px;
    color: var(--dark-gray);
    font-weight: 500;
}

.comments-section {
    background-color: var(--light-gray);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
}

.comment-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--paypal-blue);
}

.comment-date {
    font-size: 12px;
    color: var(--medium-gray);
}

.comment-text {
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.5;
}

/* ============================================
   SUCCESS MESSAGES
   ============================================ */

.success-message {
    background-color: #D4EDDA;
    border: 1px solid var(--success);
    border-left: 4px solid var(--success);
    color: #155724;
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.success-message svg {
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

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

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .modal-large {
        max-width: 100%;
        margin: 0;
        height: 100vh;
        border-radius: 0;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .sidebar,
    .top-nav,
    .modal-backdrop,
    .btn,
    .form-actions {
        display: none !important;
    }

    .content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #000;
    }

    body {
        background-color: white;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

[aria-hidden="true"] {
    display: none;
}

.focus-visible:focus {
    outline: 2px solid var(--paypal-blue);
    outline-offset: 2px;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--paypal-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   HELPER TEXT
   ============================================ */

.helper-text {
    font-size: 12px;
    color: var(--medium-gray);
    margin-top: var(--spacing-xs);
}

.error-text {
    font-size: 12px;
    color: var(--error);
    margin-top: var(--spacing-xs);
}

/* ============================================
   REQUIRED FIELD INDICATOR
   ============================================ */

.form-group label.required::after {
    content: ' *';
    color: var(--error);
}

/* ============================================
   INFO BANNERS IN MODAL
   ============================================ */

.info-box {
    background-color: #E3F2FD;
    border-left: 4px solid var(--info);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-sm);
}

.info-box p {
    margin: 0;
    font-size: 14px;
    color: #0C5460;
}

.info-box strong {
    color: var(--paypal-blue);
}
