/**
 * Identitypass Admin - Quick Start Template Styles
 * Exact match to the Quick Start guide design
 */

/* Import Modern Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   Base Styles
   ============================================ */
.idp-admin-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafafa !important;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.idp-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 2rem;
}

/* ============================================
   Success Notice
   ============================================ */
.idp-notice {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.idp-notice-icon {
    font-size: 1.25rem;
    color: #16a34a;
}

.idp-notice-text {
    color: #166534;
    font-weight: 500;
    margin: 0;
    font-size: 0.9rem;
}

/* ============================================
   Privacy Notice
   ============================================ */
.privacy-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.privacy-icon {
    color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}

.privacy-text {
    font-size: 0.875rem;
    color: #1e40af;
    line-height: 1.5;
}

.privacy-text strong {
    font-weight: 600;
}

.privacy-text a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.privacy-text a:hover {
    color: #1d4ed8;
}

/* ============================================
   Prembly Authorization Styles
   ============================================ */
.prembly-auth-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.prembly-auth-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    max-width: 800px;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.prembly-auth-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.prembly-auth-card > p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.prembly-auth-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.prembly-auth-status .dashicons-yes-alt {
    color: #16a34a;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.prembly-auth-status p {
    margin: 0;
    color: #166534;
    font-weight: 500;
}

.prembly-auth-table th {
    width: 150px;
    padding-left: 0;
}

.password-display-wrapper,
.password-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 400px;
}

.password-display-wrapper input,
.password-input-wrapper input {
    flex: 1;
}

.password-toggle-btn {
    padding: 0 8px !important;
    height: 30px !important;
    min-height: 30px !important;
    border: 1px solid #8c8f94 !important;
    background: #f6f7f7 !important;
    cursor: pointer;
}

.password-toggle-btn:hover {
    background: #f0f0f1 !important;
    border-color: #8c8f94 !important;
}

.password-toggle-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #50575e;
}

.password-toggle-btn.showing .dashicons-visibility:before {
    content: "\f177"; /* dashicons-hidden */
}

.prembly-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.prembly-status-active {
    background: #d1fae5;
    color: #065f46;
}

.prembly-auth-help {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.prembly-auth-help h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 0;
}

.prembly-auth-help ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prembly-auth-help li {
    padding: 0.5rem 0;
    color: #6b7280;
}

.prembly-auth-help a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.prembly-auth-help a:hover {
    text-decoration: underline;
}

#prembly-login-btn .dashicons {
    float: left;
    margin-right: 5px;
}

#prembly-login-form .spinner {
    visibility: hidden;
}

#prembly-login-form.loading .spinner {
    visibility: visible;
}

#prembly-message-container {
    margin-bottom: 1rem;
}

#prembly-message-container .notice {
    margin: 0 0 1rem 0;
}

/* ============================================
   Prembly SDK List Styles
   ============================================ */
.prembly-sdk-list-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.prembly-sdk-list-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.sdk-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.sdk-list-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.sdk-count {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
}

.sdk-count strong {
    color: #4f46e5;
    font-size: 20px;
    font-weight: 700;
}

.prembly-sdk-table {
    margin-top: 1rem;
}

.prembly-sdk-table th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.prembly-sdk-table td {
    vertical-align: middle;
}

.prembly-sdk-table .sdk-name {
    width: 30%;
}

.prembly-sdk-table .sdk-id {
    width: 30%;
}

.widget-key {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 12px;
    color: #374151;
    display: inline-block;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.copy-widget-key {
    margin-left: 8px !important;
    padding: 2px 8px !important;
    height: auto !important;
    line-height: 1.4 !important;
    font-size: 11px !important;
    vertical-align: middle;
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #374151 !important;
    cursor: pointer;
}

.copy-widget-key:hover {
    background: #4f46e5 !important;
    color: #fff !important;
    border-color: #4f46e5 !important;
}

.prembly-sdk-table .sdk-status {
    width: 12%;
}

.prembly-sdk-table .sdk-created {
    width: 15%;
}

.prembly-sdk-table .sdk-actions {
    width: 13%;
}

.sdk-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.sdk-status-active {
    background: #d1fae5;
    color: #065f46;
}

.sdk-status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.sdk-pagination {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.sdk-pagination .tablenav {
    clear: both;
}

.sdk-pagination .tablenav-pages {
    margin: 0;
    text-align: center;
}

.sdk-pagination .displaying-num {
    margin-right: 15px;
    color: #6b7280;
    font-size: 14px;
}

.sdk-pagination .pagination-links {
    display: inline-block;
}

.sdk-pagination .pagination-links .button {
    margin: 0 4px;
    padding: 6px 12px;
    text-decoration: none;
}

.sdk-pagination .pagination-links .paging-input {
    margin: 0 10px;
    color: #1f2937;
    font-size: 14px;
}

.sdk-pagination .pagination-links .current-page,
.sdk-pagination .pagination-links .total-pages {
    font-weight: 600;
    color: #4f46e5;
}

/* SDK Details Modal */
.sdk-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.sdk-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.sdk-modal-close {
    color: #9ca3af;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.sdk-modal-close:hover,
.sdk-modal-close:focus {
    color: #1f2937;
}

.sdk-modal-content h2 {
    margin-top: 0;
    color: #1f2937;
}

.sdk-details-table th {
    width: 200px;
    padding-left: 0;
}

.sdk-details-table pre {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.875rem;
}

/* ============================================
   Quick Start Header
   ============================================ */
.quick-start-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.code-icon {
    color: #6b7280;
    flex-shrink: 0;
}

.quick-start-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.quick-start-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 2rem 0;
    line-height: 1.5;
}

.doc-link {
    color: #2D9B9B;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.doc-link:hover {
    color: #1f7a7a;
}

/* ============================================
   Form Styles
   ============================================ */
.quick-start-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ============================================
   Step Styles
   ============================================ */
.quick-start-step {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    gap: 1rem;
}

.step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #2D9B9B;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.375rem 0;
}

.step-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.875rem 0;
    line-height: 1.5;
}

/* Code Block */
.code-block {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.875rem;
    font-family: 'Monaco', 'Courier New', monospace;
}

.code-block code {
    font-size: 0.875rem;
    color: #374151;
}

/* Input Field */
.step-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #111827;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    transition: all 0.2s;
    outline: none;
}

.step-input::placeholder {
    color: #9ca3af;
}

.step-input:focus {
    border-color: #2D9B9B;
    box-shadow: 0 0 0 3px rgba(45, 155, 155, 0.1);
}

.step-input:hover:not(:focus) {
    border-color: #9ca3af;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
}

.step-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2D9B9B;
}

.checkbox-label {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

/* ============================================
   Submit Button
   ============================================ */
.form-actions {
    margin-top: 0.5rem;
}

.save-btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: #2D9B9B;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #1f7a7a;
}

.save-btn:active {
    transform: scale(0.98);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .idp-container {
        padding: 1.5rem;
    }
    
    .quick-start-title {
        font-size: 1.25rem;
    }
    
    .quick-start-step {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .idp-admin-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .idp-container {
        padding: 1.25rem;
    }
    
    .quick-start-step {
        flex-direction: column;
    }
}
