/* public/assets/portal.css */

/* Reset theme wrapper styles */
.entry-content:has(.scp-portal),
.entry-content:has(.scp-login-container),
.page-content:has(.scp-portal),
.page-content:has(.scp-login-container),
article:has(.scp-portal),
article:has(.scp-login-container) {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

.scp-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    box-sizing: border-box;
}

.logged-in.admin-bar .scp-login-container {
    top: 32px;
    min-height: calc(100vh - 32px);
}

.scp-login-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 50px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.scp-login-logo {
    text-align: center;
    margin-bottom: 60px;
}

.scp-login-logo img {
    max-width: 280px;
    height: auto;
}

.scp-form .scp-field {
    margin-bottom: 25px;
}

.scp-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.scp-form input {
    width: 100%;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.scp-form input:focus {
    outline: none;
    border-color: #0073aa;
}

.scp-button {
    display: inline-block;
    padding: 14px 28px;
    background: #0073aa;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.scp-button:hover {
    background: #005a87;
    color: #fff !important;
}

.scp-button-secondary {
    background: #f0f0f0;
    color: #0073aa !important;
}

.scp-button-secondary:hover {
    background: #e0e0e0;
    color: #005a87 !important;
}

.scp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.scp-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.scp-form-title {
    text-align: center;
    margin: 0 0 25px 0;
    font-size: 1.25rem;
    color: #333;
}

.scp-text-center {
    text-align: center;
    margin-top: 20px;
}

.scp-text-center a {
    color: #005a87;
    text-decoration: none;
}

.scp-text-center a:hover {
    text-decoration: underline;
}

.scp-password-hint {
    font-size: 0.85rem;
    color: #666;
    margin: -15px 0 20px 0;
}

/* Portal Layout */
.scp-portal {
    height: 100vh;
    background: #f8f9fa;
    width: 100vw;
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999;
    overflow-y: scroll !important;
    overflow-x: hidden;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch;
}

.logged-in.admin-bar .scp-portal {
    top: 32px !important;
    height: calc(100vh - 32px);
}

/* Ensure content can expand and trigger scroll */
.scp-portal > .scp-content {
    min-height: auto;
    padding-bottom: 60px;
}

.scp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: #fff;
    border-bottom: 1px solid #eee;
    min-height: auto;
    max-height: 90px;
}

.scp-header-left {
    min-width: 200px;
}

.scp-header-left img {
    max-height: 60px;
    width: auto;
}

.scp-header h1 {
    display: none;
}

.scp-back,
.scp-logout {
    color: #2e8b57;
    text-decoration: none;
    white-space: nowrap;
    font-size: 16px;
}

.scp-back:hover,
.scp-logout:hover {
    text-decoration: underline;
}

.scp-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.scp-content h1 {
    text-align: center;
    margin-bottom: 30px;
}

/* Navigation Cards */
.scp-nav-cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px !important;
}

.scp-nav-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.scp-nav-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.scp-nav-card-icon {
    color: var(--wp--preset--color--primary, #0073aa);
    margin-bottom: 20px;
}

.scp-nav-card h2 {
    margin: 0 0 10px;
}

.scp-nav-card p {
    margin: 0;
    color: #666;
}

.scp-nav-card.scp-nav-card-wide {
    grid-column: 1 / -1 !important;
}

/* List Items */
.scp-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scp-list-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.scp-list-item h3 {
    margin: 0 0 8px;
}

.scp-list-item p {
    margin: 0 0 8px;
    color: #666;
}

.scp-date {
    color: #999;
    font-size: 14px;
}

.scp-list-item-actions {
    display: flex;
    gap: 10px;
}

.scp-empty {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* Report Content */
.scp-report-meta {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.scp-report-meta-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.scp-report-meta .scp-date {
    color: #666;
    font-size: 14px;
}

.scp-report-meta .scp-description {
    color: #444;
    margin: 0;
    line-height: 1.5;
}

.scp-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #005a87;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.scp-download-btn:hover {
    background: #004266;
    color: #fff !important;
    text-decoration: none;
}

.scp-download-btn svg {
    flex-shrink: 0;
}

/* PDF Viewer */
.scp-pdf-viewer {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.scp-pdf-viewer iframe {
    display: block;
    width: 100%;
    height: 800px;
    border: none;
}

.scp-pdf-fallback {
    text-align: center;
    padding: 15px;
    margin: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #666;
}

.scp-pdf-fallback a {
    color: #0073aa;
}

.scp-no-pdf {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    color: #666;
}

/* Bill Cards */
.scp-bill-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
}

.scp-bill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.scp-bill-number {
    font-weight: 600;
    color: var(--wp--preset--color--primary, #0073aa);
}

.scp-external-link {
    font-size: 14px;
}

.scp-bill-card h3 {
    margin: 0 0 10px;
}

.scp-bill-sponsor {
    margin: 0 0 15px;
    color: #555;
    font-size: 15px;
}

.scp-bill-sponsor strong {
    color: #333;
}

.scp-sponsor-link {
    color: #0073aa;
    text-decoration: none;
}

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

.scp-bill-card > p {
    margin: 0 0 20px;
    color: #666;
}

/* Position Buttons */
.scp-bill-response {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.scp-current-position {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.scp-position {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.scp-position-support { background: #d4edda; color: #155724; }
.scp-position-oppose { background: #f8d7da; color: #721c24; }
.scp-position-watch { background: #fff3cd; color: #856404; }
.scp-position-remove { background: #e2e3e5; color: #383d41; }

.scp-change-position {
    background: none;
    border: none;
    color: var(--wp--preset--color--primary, #0073aa);
    cursor: pointer;
    text-decoration: underline;
}

.scp-position-buttons,
.scp-priority-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.scp-position-buttons.hidden,
.scp-priority-buttons.hidden {
    display: none;
}

.scp-position-btn,
.scp-priority-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.scp-position-btn:hover,
.scp-priority-btn:hover {
    border-color: #999;
}

.scp-position-btn.scp-support:hover { border-color: #28a745; background: #d4edda; }
.scp-position-btn.scp-oppose:hover { border-color: #dc3545; background: #f8d7da; }
.scp-position-btn.scp-watch:hover { border-color: #ffc107; background: #fff3cd; }
.scp-position-btn.scp-remove:hover { border-color: #6c757d; background: #e2e3e5; }

.scp-cancel-priority {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

/* Add Note Button */
.scp-add-note-btn {
    background: none;
    border: 1px solid #0073aa;
    color: #0073aa;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: auto;
}

.scp-add-note-btn:hover {
    background: #0073aa;
    color: #fff;
}

.scp-no-position-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

/* Notes Section */
.scp-notes-section {
    border-top: 1px solid #eee;
    margin-top: 15px;
    padding-top: 15px;
}

.scp-notes-section.hidden {
    display: none;
}

.scp-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scp-notes-toggle {
    color: #0073aa;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.scp-notes-toggle:hover {
    text-decoration: underline;
}

.scp-note-count {
    background: #0073aa;
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.scp-notes-thread {
    margin-top: 15px;
}

.scp-notes-thread.hidden {
    display: none;
}

.scp-notes-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.scp-note-item {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
}

.scp-note-item.scp-note-client {
    background: #e8f4fd;
    margin-left: 20px;
}

.scp-note-item.scp-note-admin {
    background: #f0f0f0;
    margin-right: 20px;
}

.scp-note-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.scp-note-author {
    font-weight: 600;
}

.scp-note-text {
    font-size: 14px;
    line-height: 1.5;
}

.scp-note-form {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.scp-note-input {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.scp-note-input:focus {
    outline: none;
    border-color: #0073aa;
}

.scp-note-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end;
}

.scp-save-note-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.scp-save-note-btn:hover {
    background: #005a87;
}

.scp-save-note-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.scp-cancel-note-btn {
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.scp-cancel-note-btn:hover {
    background: #e0e0e0;
}

/* Legislative Tracking Widget */
.scp-tracking-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
}

.scp-tracking-widget iframe {
    max-width: 100%;
    width: 100%;
    min-height: 600px;
    border: none;
}
