/**
 * HOALF Attorney Portal — Frontend Styles
 * Brand color: #1b2d4f (dark navy)
 */

/* =========================================================================
   Reset / Base
   ========================================================================= */

.hoalf-portal-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

.hoalf-portal-wrap *,
.hoalf-portal-wrap *::before,
.hoalf-portal-wrap *::after {
    box-sizing: border-box;
}

.hoalf-portal-wrap h2 {
    color: #1b2d4f;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
}

.hoalf-portal-wrap h3 {
    color: #1b2d4f;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
}

.hoalf-portal-wrap p {
    margin: 0 0 16px;
    color: #555;
}

.hoalf-portal-wrap a {
    color: #1b2d4f;
    text-decoration: underline;
}

.hoalf-portal-wrap a:hover {
    color: #2563eb;
}

/* =========================================================================
   Auth Card (login, register, forgot, reset, verify)
   ========================================================================= */

.hoalf-auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 40px;
}

.hoalf-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.hoalf-auth-header p {
    color: #777;
    font-size: 14px;
}

.hoalf-auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.hoalf-divider {
    color: #ccc;
    margin: 0 8px;
}

/* =========================================================================
   Forms
   ========================================================================= */

.hoalf-form {}

.hoalf-field {
    margin-bottom: 18px;
}

.hoalf-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.hoalf-field label small {
    font-weight: 400;
    color: #888;
}

.hoalf-field input[type="text"],
.hoalf-field input[type="email"],
.hoalf-field input[type="password"],
.hoalf-field input[type="tel"],
.hoalf-field input[type="url"],
.hoalf-field input[type="number"],
.hoalf-field select,
.hoalf-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hoalf-field input:focus,
.hoalf-textarea:focus {
    outline: none;
    border-color: #1b2d4f;
    box-shadow: 0 0 0 3px rgba(27,45,79,0.1);
}

.hoalf-textarea {
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.hoalf-field-row {
    display: flex;
    gap: 16px;
}

.hoalf-field-row .hoalf-field {
    flex: 1;
}

.hoalf-help-text {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* =========================================================================
   Buttons
   ========================================================================= */

.hoalf-portal-wrap .hoalf-btn,
.hoalf-portal-wrap button.hoalf-btn,
.hoalf-portal-wrap a.hoalf-btn,
.hoalf-portal-wrap input.hoalf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
    line-height: 1.4;
}

.hoalf-portal-wrap .hoalf-btn:hover {
    text-decoration: none !important;
}

.hoalf-portal-wrap .hoalf-btn-primary,
.hoalf-portal-wrap button.hoalf-btn-primary,
.hoalf-portal-wrap a.hoalf-btn-primary,
.hoalf-portal-wrap input.hoalf-btn-primary {
    background-color: #1b2d4f !important;
    color: #fff !important;
    border-color: #1b2d4f !important;
}

.hoalf-portal-wrap .hoalf-btn-primary:hover,
.hoalf-portal-wrap button.hoalf-btn-primary:hover,
.hoalf-portal-wrap a.hoalf-btn-primary:hover {
    background-color: #253d6b !important;
    border-color: #253d6b !important;
    color: #fff !important;
}

.hoalf-portal-wrap .hoalf-btn-outline,
.hoalf-portal-wrap button.hoalf-btn-outline,
.hoalf-portal-wrap a.hoalf-btn-outline {
    background: transparent !important;
    color: #1b2d4f !important;
    border-color: #1b2d4f !important;
}

.hoalf-portal-wrap .hoalf-btn-outline:hover,
.hoalf-portal-wrap button.hoalf-btn-outline:hover,
.hoalf-portal-wrap a.hoalf-btn-outline:hover {
    background-color: #1b2d4f !important;
    color: #fff !important;
}

.hoalf-portal-wrap .hoalf-btn-danger,
.hoalf-portal-wrap button.hoalf-btn-danger,
.hoalf-portal-wrap a.hoalf-btn-danger {
    color: #dc2626 !important;
    border-color: #dc2626 !important;
}

.hoalf-portal-wrap .hoalf-btn-danger:hover,
.hoalf-portal-wrap button.hoalf-btn-danger:hover,
.hoalf-portal-wrap a.hoalf-btn-danger:hover {
    background-color: #dc2626 !important;
    color: #fff !important;
}

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

.hoalf-btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.hoalf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hoalf-btn.hoalf-loading {
    pointer-events: none;
    opacity: 0.7;
}

.hoalf-btn.hoalf-loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hoalf-spin 0.6s linear infinite;
}

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

/* =========================================================================
   Cards
   ========================================================================= */

.hoalf-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px;
    margin-bottom: 24px;
}

.hoalf-card-wide {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.hoalf-card-cta {
    text-align: center;
    padding: 48px 32px;
}

.hoalf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.hoalf-card-header h3 {
    margin: 0;
}

/* =========================================================================
   Dashboard
   ========================================================================= */

.hoalf-dashboard {}

.hoalf-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.hoalf-dash-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hoalf-tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hoalf-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.hoalf-stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 24px;
    text-align: center;
}

.hoalf-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1b2d4f;
}

.hoalf-stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* Actions grid */
.hoalf-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.hoalf-action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-decoration: none !important;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.hoalf-action-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 12px 0 0 12px;
    transition: width 0.25s ease;
}

.hoalf-action-card:hover {
    border-color: #1b2d4f;
    box-shadow: 0 4px 20px rgba(27,45,79,0.12);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.hoalf-action-card:hover::before {
    width: 4px;
}

.hoalf-action-card:hover .hoalf-action-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Icon wraps with colored backgrounds */
.hoalf-action-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    color: #fff;
}

.hoalf-icon-edit {
    background: linear-gradient(135deg, #1b2d4f, #2d4a7a);
}

.hoalf-icon-upgrade {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.hoalf-icon-billing {
    background: linear-gradient(135deg, #059669, #10b981);
}

.hoalf-action-card:nth-child(1)::before { background: #1b2d4f; }
.hoalf-action-card:nth-child(2)::before { background: #d97706; }
.hoalf-action-card:nth-child(3)::before { background: #059669; }

.hoalf-action-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.hoalf-action-title {
    font-size: 16px;
    font-weight: 600;
    color: #1b2d4f;
    margin-bottom: 2px;
}

.hoalf-action-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.hoalf-action-arrow {
    color: #9ca3af;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

/* Listing preview */
.hoalf-listing-preview {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.hoalf-listing-preview h4 {
    margin: 0 0 8px;
    color: #1b2d4f;
    font-size: 18px;
}

.hoalf-listing-meta {
    margin: 0 0 4px;
    font-size: 14px;
    color: #666;
}

/* =========================================================================
   Claim page
   ========================================================================= */

.hoalf-search-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.hoalf-search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.hoalf-search-input:focus {
    outline: none;
    border-color: #1b2d4f;
}

.hoalf-results-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.hoalf-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hoalf-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: background 0.2s;
}

.hoalf-result-item:hover {
    background: #f0f4ff;
}

.hoalf-result-info h4 {
    margin: 0 0 2px;
    font-size: 15px;
    color: #1b2d4f;
}

.hoalf-result-info p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.hoalf-result-claimed {
    font-size: 12px;
    color: #dc2626;
    font-weight: 600;
}

/* =========================================================================
   Modal
   ========================================================================= */

.hoalf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.hoalf-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

.hoalf-modal-content h3 {
    margin-top: 0;
}

/* =========================================================================
   Tiers page
   ========================================================================= */

.hoalf-tiers-header {
    text-align: center;
    margin-bottom: 40px;
}

.hoalf-tiers-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.hoalf-tiers-header p {
    font-size: 16px;
    color: #6b7280;
}

.hoalf-tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hoalf-tiers-4col {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.hoalf-tier-card {
    position: relative;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px 24px 24px;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hoalf-tier-card:hover {
    border-color: #1b2d4f;
    box-shadow: 0 8px 30px rgba(27,45,79,0.12);
    transform: translateY(-4px);
}

.hoalf-tier-popular {
    border-color: #1b2d4f;
    box-shadow: 0 8px 30px rgba(27,45,79,0.15);
    transform: scale(1.03);
    z-index: 1;
}

.hoalf-tier-popular:hover {
    transform: scale(1.03) translateY(-4px);
}

.hoalf-tier-current {
    border-color: #1b2d4f;
    box-shadow: 0 0 0 2px rgba(27,45,79,0.15);
}

.hoalf-tier-current-badge,
.hoalf-tier-popular-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.hoalf-tier-current-badge {
    background: #1b2d4f;
}

.hoalf-tier-popular-badge {
    background: linear-gradient(135deg, #1b2d4f, #2d4a7a);
}

.hoalf-tier-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 16px;
}

.hoalf-tier-name {
    font-size: 20px;
    font-weight: 700;
    color: #1b2d4f;
    margin-bottom: 4px;
}

.hoalf-tier-tagline {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.hoalf-tier-price {
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.hoalf-tier-amount {
    font-size: 40px;
    font-weight: 800;
    color: #1b2d4f;
    line-height: 1;
}

.hoalf-tier-period {
    font-size: 15px;
    color: #9ca3af;
    font-weight: 500;
}

.hoalf-tier-divider {
    width: 100%;
    height: 1px;
    background: #e5e7eb;
    margin-bottom: 20px;
}

.hoalf-tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    text-align: left;
    width: 100%;
    flex: 1;
}

.hoalf-tier-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}

.hoalf-tier-features li .hoalf-check-icon {
    flex-shrink: 0;
    color: #059669;
    margin-top: 1px;
}

.hoalf-tier-card-footer {
    width: 100%;
    margin-top: auto;
}

/* =========================================================================
   Editor
   ========================================================================= */

.hoalf-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.hoalf-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.hoalf-photo-upload {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.hoalf-photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.hoalf-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hoalf-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #999;
    font-size: 13px;
}

.hoalf-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hoalf-form-footer {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* =========================================================================
   Billing
   ========================================================================= */

.hoalf-billing-plan {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.hoalf-billing-plan-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hoalf-billing-plan-desc {
    font-size: 14px;
    color: #666;
}

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

.hoalf-detail-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.hoalf-detail-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 180px;
}

/* =========================================================================
   Messages / Notices
   ========================================================================= */

.hoalf-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

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

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

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

.hoalf-notice {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hoalf-notice-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.hoalf-notice-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.hoalf-notice-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.hoalf-notice-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.hoalf-text-warning { color: #d97706; }
.hoalf-text-info { color: #2563eb; }

/* =========================================================================
   Back link
   ========================================================================= */

.hoalf-back-link {
    display: inline-block;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    margin-bottom: 20px;
}

.hoalf-back-link:hover {
    color: #1b2d4f;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1024px) and (min-width: 769px) {
    .hoalf-tiers-4col {
        grid-template-columns: repeat(2, 1fr);
    }

    .hoalf-tier-popular {
        transform: none;
    }
}

@media (max-width: 768px) {
    .hoalf-portal-wrap {
        padding: 20px 16px;
    }

    .hoalf-auth-card {
        padding: 28px 24px;
    }

    .hoalf-field-row {
        flex-direction: column;
        gap: 0;
    }

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

    .hoalf-tiers-grid,
    .hoalf-tiers-4col {
        grid-template-columns: 1fr;
    }

    .hoalf-tier-popular {
        transform: none;
    }

    .hoalf-tier-popular:hover {
        transform: translateY(-4px);
    }

    .hoalf-actions-grid {
        grid-template-columns: 1fr;
    }

    .hoalf-action-arrow {
        opacity: 1;
        transform: translateX(0);
    }

    .hoalf-dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hoalf-search-wrap {
        flex-direction: column;
    }

    .hoalf-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .hoalf-photo-upload {
        flex-direction: column;
    }

    .hoalf-billing-plan {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .hoalf-form-footer {
        flex-direction: column;
    }
}
