/**
 * OMPPM Admin Styles
 * Modern, responsive design for the OMPPM admin interface
 */

.omppm-admin {
    margin: 20px 0;
}

.omppm-admin h1 {
    color: #1d2327;
    font-size: 2.3em;
    font-weight: 400;
    margin: 0 0 1rem 0;
    padding: 9px 0 4px 0;
    line-height: 1.3;
}

/* Grid Layout */
.omppm-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Card Design */
.omppm-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease-in-out;
}

.omppm-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.omppm-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 20px;
    border-bottom: 1px solid #c3c4c7;
}

.omppm-card-header h2 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
}

.omppm-card-body {
    padding: 20px;
}

/* Debug Controls */
.omppm-debug-controls {
    margin-bottom: 20px;
}

.omppm-switch-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.omppm-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-right: 15px;
}

.omppm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.omppm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.omppm-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .omppm-slider {
    background-color: #2271b1;
}

input:focus + .omppm-slider {
    box-shadow: 0 0 1px #2271b1;
}

input:checked + .omppm-slider:before {
    transform: translateX(26px);
}

.omppm-switch-label {
    font-weight: 500;
    color: #1d2327;
}

.omppm-debug-status {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 12px;
    background: #f6f7f7;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
}

.omppm-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.omppm-status-indicator.active {
    background-color: #00a32a;
    box-shadow: 0 0 0 2px rgba(0, 163, 42, 0.2);
}

.omppm-status-indicator.inactive {
    background-color: #d63638;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.2);
}

.omppm-status-text {
    font-weight: 500;
    color: #1d2327;
}

/* Debug Info */
.omppm-debug-info {
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.omppm-debug-info p {
    margin: 0 0 10px 0;
    color: #1d2327;
}

.omppm-debug-info ul {
    margin: 0;
    padding-left: 20px;
}

.omppm-debug-info li {
    margin-bottom: 5px;
    color: #50575e;
}

/* Log Management */
.omppm-log-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.omppm-log-info li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
}

.omppm-log-info li:last-child {
    border-bottom: none;
}

.omppm-log-info code {
    background: #f6f7f7;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.omppm-log-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Status Grid */
.omppm-status-grid {
    display: grid;
    gap: 12px;
}

.omppm-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f6f7f7;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
}

.omppm-status-label {
    font-weight: 500;
    color: #1d2327;
}

.omppm-status-value {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.omppm-status-value.omppm-success {
    background: #d1e7dd;
    color: #0f5132;
}

.omppm-status-value.omppm-warning {
    background: #fff3cd;
    color: #856404;
}

.omppm-status-value.omppm-error {
    background: #f8d7da;
    color: #721c24;
}

/* Quick Actions */
.omppm-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.omppm-quick-actions .button {
    text-align: center;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.omppm-quick-actions .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Notifications */
#omppm-notifications {
    position: fixed;
    top: 32px;
    right: 20px;
    z-index: 999999;
    max-width: 400px;
}

.omppm-notification {
    background: #fff;
    border-left: 4px solid #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
    position: relative;
}

.omppm-notification.success {
    border-left-color: #00a32a;
}

.omppm-notification.error {
    border-left-color: #d63638;
}

.omppm-notification.warning {
    border-left-color: #dba617;
}

.omppm-notification .omppm-notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.omppm-notification .omppm-notification-close:hover {
    color: #000;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.omppm-notification.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Responsive Design */
@media (max-width: 782px) {
    .omppm-admin-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .omppm-card-body {
        padding: 15px;
    }
    
    .omppm-log-actions {
        flex-direction: column;
    }
    
    .omppm-log-actions .button {
        width: 100%;
    }
    
    .omppm-quick-actions .button {
        width: 100%;
    }
    
    #omppm-notifications {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* Loading States */
.omppm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.omppm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* WordPress Admin Integration */
.wp-admin .omppm-admin {
    background: #f0f0f1;
    margin: 0;
    padding: 20px;
    min-height: calc(100vh - 32px);
}

.wp-admin .omppm-admin h1 {
    color: #1d2327;
    margin-bottom: 20px;
}

/* Setup Instructions */
.omppm-setup-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.omppm-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border-left: 4px solid #2271b1;
    position: relative;
}

.omppm-step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.omppm-step-content h3 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 1.1em;
    font-weight: 600;
}

.omppm-step-content p {
    margin: 0 0 15px 0;
    color: #50575e;
    line-height: 1.5;
}

.omppm-step-highlight {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.omppm-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.omppm-badge-success {
    background: #00a32a;
    color: white;
}

.omppm-step-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9em;
    color: #856404;
}

.omppm-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.omppm-step-options {
    display: grid;
    gap: 12px;
    margin: 15px 0;
}

.omppm-option {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease-in-out;
}

.omppm-option:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.omppm-option strong {
    color: #1d2327;
    font-weight: 600;
    min-width: 120px;
}

.omppm-option-desc {
    color: #50575e;
    font-size: 0.9em;
}

.omppm-step-actions {
    margin: 15px 0;
}

.omppm-step-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* How It Works */
.omppm-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.omppm-info-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease-in-out;
}

.omppm-info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.omppm-info-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.omppm-info-item h4 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 1.1em;
    font-weight: 600;
}

.omppm-info-item p {
    margin: 0;
    color: #50575e;
    line-height: 1.5;
    font-size: 0.9em;
}

/* Troubleshooting */
.omppm-troubleshooting {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.omppm-issue {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    overflow: hidden;
}

.omppm-issue-header {
    background: #fed7d7;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #fed7d7;
}

.omppm-issue-header h4 {
    margin: 0;
    color: #c53030;
    font-size: 1.1em;
    font-weight: 600;
}

.omppm-issue-solutions {
    padding: 20px;
}

.omppm-issue-solutions p {
    margin: 0 0 10px 0;
    color: #1d2327;
}

.omppm-issue-solutions ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.omppm-issue-solutions li {
    margin-bottom: 5px;
    color: #50575e;
}

.omppm-issue-action {
    margin-top: 15px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .omppm-card {
        background: #1e1e1e;
        border-color: #3c434a;
    }
    
    .omppm-card-header {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    .omppm-debug-status,
    .omppm-status-item,
    .omppm-status-text {
        background: #2d3748;
        color: #e2e8f0;
    }

    .omppm-status-label, 
    .omppm-card-body {
        color: #e2e8f0;
    }
    
    .omppm-debug-info, 
    .omppm-debug-info p, 
    .omppm-debug-info ul, 
    .omppm-debug-info li {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .omppm-log-info code {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .omppm-step {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-left-color: #667eea;
    }
    
    .omppm-step-content h3 {
        color: #e2e8f0;
    }
    
    .omppm-step-content p {
        color: #a0aec0;
    }
    
    .omppm-step-highlight {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .omppm-step-note {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .omppm-option {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .omppm-option strong {
        color: #e2e8f0;
    }
    
    .omppm-option-desc {
        color: #a0aec0;
    }
    
    .omppm-info-item {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
    }
    
    .omppm-info-item h4 {
        color: #e2e8f0;
    }
    
    .omppm-info-item p {
        color: #a0aec0;
    }
    
    .omppm-issue {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .omppm-issue-header {
        background: #4a5568;
        border-bottom-color: #4a5568;
    }
    
    .omppm-issue-header h4 {
        color: #fed7d7;
    }
    
    .omppm-issue-solutions p {
        color: #e2e8f0;
    }
    
    .omppm-issue-solutions li {
        color: #a0aec0;
    }
    
    .omppm-developer-info {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
    }
    
    .omppm-developer-details h3 {
        color: #e2e8f0;
    }
    
    .omppm-developer-title {
        color: #a0aec0;
    }
    
    .omppm-developer-company h4 {
        color: #e2e8f0;
    }
    
    .omppm-developer-company p {
        color: #a0aec0;
    }
    
    .omppm-contact-item a {
        color: #63b3ed;
    }
    
    .omppm-contact-item a:hover {
        color: #90cdf4;
    }
}

/* Developer Info */
.omppm-developer-info {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.omppm-developer-avatar {
    flex-shrink: 0;
}

.omppm-avatar-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.omppm-avatar-placeholder img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.omppm-avatar-text {
    color: white;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Georgia', serif;
}

.omppm-developer-details {
    flex: 1;
}

.omppm-developer-details h3 {
    margin: 0 0 5px 0;
    color: #1d2327;
    font-size: 1.4em;
    font-weight: 600;
}

.omppm-developer-title {
    margin: 0 0 15px 0;
    color: #50575e;
    font-size: 1em;
    font-style: italic;
}

.omppm-developer-company {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.omppm-developer-company h4 {
    margin: 0 0 5px 0;
    color: #1d2327;
    font-size: 1.1em;
    font-weight: 600;
}

.omppm-developer-company p {
    margin: 0;
    color: #50575e;
    font-size: 0.9em;
    line-height: 1.4;
}

.omppm-developer-contact {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.omppm-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease-in-out;
}

.omppm-contact-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.omppm-contact-item a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.omppm-contact-item a:hover {
    color: #135e96;
    text-decoration: underline;
}

.omppm-developer-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.omppm-developer-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.omppm-developer-actions .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for developer card */
@media (max-width: 782px) {
    .omppm-developer-info {
        flex-direction: column;
        text-align: center;
    }
    
    .omppm-developer-actions {
        justify-content: center;
    }
    
    .omppm-developer-actions .button {
        width: 100%;
        justify-content: center;
    }
} 