/**
 * Theraplo WordPress Plugin - Admin Styles
 * Consolidated CSS from all admin view files
 *
 * This file contains all styles for the Theraplo admin interface,
 * extracted from individual view files and organized by section.
 */

/* ========================================
   GLOBAL STYLES & FONTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&display=swap');

/* ========================================
   SHARED COMPONENTS
   ======================================== */

/* Logo Header - Used across all pages */
.theraplo-logo-header {
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.theraplo-logo-header img {
    max-width: 120px;
    height: auto;
}

/* ========================================
   INTRODUCTION PAGE (page-intro.php)
   ======================================== */
.theraplo-intro {
    max-width: 800px;
    margin: 20px auto;
    font-family: 'Manrope', sans-serif;
}

.theraplo-intro h1 {
    color: #333;
    margin-bottom: 20px;
}

.theraplo-intro-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.theraplo-intro-card h2 {
    color: #00A53D;
    margin-top: 0;
}

.theraplo-intro-card p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.theraplo-intro-card ul {
    padding-left: 20px;
}

.theraplo-intro-card li {
    margin-bottom: 8px;
}

/* ========================================
   SETUP PAGE (page-setup.php)
   ======================================== */
.theraplo-admin {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    font-family: 'Manrope', sans-serif;
}

.theraplo-header {
    background: #fff;
    color: #333;
    padding: 20px 30px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    border-bottom: 3px solid #00A53D;
}

.theraplo-header h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
    font-weight: 600;
    color: #333;
}

.theraplo-header p {
    margin: 0;
    color: #666;
    font-size: 1em;
}

.theraplo-content {
    padding: 30px;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.theraplo-form-group {
    margin-top: 30px;
    margin-bottom: 25px;
}

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

.theraplo-textarea {
    width: 100%;
    min-height: 300px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.theraplo-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.theraplo-description {
    margin-top: 10px;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.theraplo-details {
    margin-top: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
}

.theraplo-details summary {
    padding: 12px 15px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: background-color 0.2s ease;
}

.theraplo-details summary:hover {
    background: #e9ecef;
}

.theraplo-details pre {
    background: #f8f9fa;
    padding: 20px;
    margin: 0;
    border: none;
    font-size: 12px;
    line-height: 1.4;
    color: #495057;
}

.theraplo-submit {
    background: #00A53D;
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theraplo-submit:hover {
    background: #008831;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 165, 61, 0.3);
}

.theraplo-usage {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-top: 30px;
}

.theraplo-usage h2 {
    margin-top: 0;
    color: #495057;
    font-size: 1.3em;
}

.theraplo-usage ol {
    margin: 0;
    padding-left: 20px;
}

.theraplo-usage li {
    margin-bottom: 8px;
    color: #666;
}

.notice {
    border-radius: 6px;
    border-left-width: 4px;
    margin: 20px 0;
}

/* ========================================
   STATUS PAGE (page-status.php)
   ======================================== */
.theraplo-status {
    max-width: 800px;
    margin: 20px auto;
    font-family: 'Manrope', sans-serif;
}

.theraplo-status h1 {
    color: #333;
    margin-bottom: 20px;
}

.theraplo-status-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.theraplo-status-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 6px;
    background: #f8f9fa;
}

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

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
}

.status-dot.green {
    background-color: #00a32a;
    box-shadow: 0 0 0 3px rgba(0, 163, 42, 0.2);
}

.status-dot.red {
    background-color: #d63638;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.2);
}

.status-dot.gray {
    background-color: #8c8f94;
    box-shadow: 0 0 0 3px rgba(140, 143, 148, 0.2);
}

.status-content {
    flex-grow: 1;
}

.status-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.status-message {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.status-actions {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.status-actions h3 {
    margin-top: 0;
    color: #333;
}

.status-actions .button {
    margin: 5px;
}

.refresh-button {
    background: #00A53D;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.refresh-button:hover {
    background: #008831;
    color: white;
}

/* ========================================
   BROWSE IDS PAGE (page-browse-ids.php)
   ======================================== */
.theraplo-browse-ids {
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Manrope', sans-serif;
}

.theraplo-browse-ids h1 {
    color: #333;
    margin-bottom: 20px;
}

.theraplo-main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.theraplo-sidebar {
    min-width: 250px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: sticky;
    top: 32px;
}

.theraplo-sidebar-header {
    color: #333;
    padding: 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.theraplo-tab {
    display: block;
    width: 100%;
    padding: 15px 20px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theraplo-tab:hover {
    background: #f8f9fa;
    color: #00A53D;
}

.theraplo-tab.active {
    color: black;
    font-weight: 600;
}

.theraplo-tab:last-child {
    border-bottom: none;
}

.theraplo-content-area {
    flex: 1;
}

.theraplo-tab-content {
    display: none;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.theraplo-tab-content.active {
    display: block;
}

.theraplo-tab-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    padding: 25px 30px;
    position: relative;
    border-bottom: 3px solid #dee2e6;
}

.theraplo-tab-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.theraplo-tab-header p {
    margin: 0;
    font-size: 0.95em;
    color: #666;
}

.theraplo-tab-icon {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 2.5em;
    opacity: 0.3;
    color: #adb5bd;
}

.theraplo-ids-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.theraplo-ids-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f1;
    transition: background-color 0.2s ease;
}

.theraplo-ids-item:hover {
    background-color: #f8f9fa;
}

.theraplo-ids-item:last-child {
    border-bottom: none;
}

.theraplo-ids-name {
    font-weight: 500;
    color: #333;
    flex-grow: 1;
}

.theraplo-ids-id {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background: #f1f3f4;
    color: #5f6368;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theraplo-ids-id:hover {
    background: #00A53D;
    color: white;
    transform: scale(1.05);
}

.theraplo-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.theraplo-loading .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00A53D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.theraplo-not-configured {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.theraplo-not-configured h3 {
    color: #856404;
    margin-top: 0;
}

.theraplo-copy-tooltip {
    position: relative;
}

.theraplo-copy-tooltip:after {
    content: "Click to copy";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
}

.theraplo-copy-tooltip:hover:after {
    opacity: 1;
}

/* ========================================
   REMOVED: ADVANCED PAGE (page-advanced.php)
   Styles page has been removed from the plugin
   ======================================== */


.theraplo-info-box {
    background: #f0f6ff;
    border: 1px solid #c3ddff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.theraplo-info-box h3 {
    margin-top: 0;
    color: #0073aa;
}

.theraplo-info-box ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.theraplo-info-box li {
    margin-bottom: 5px;
}
