/**
 * Passkey - Admin Styles
 * 
 * Styles for the admin panel interface
 * 
 * @package MDLOGIN_Passkey
 * @version 1.0.0
 */

/* Status Indicators */
.mdlogin-status-active {
    color: #28a745;
    font-weight: 500;
}

.mdlogin-status-inactive {
    color: #dc3545;
    font-weight: 500;
}

.mdlogin-credential-count {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    display: block;
}

.mdlogin-no-credentials {
    color: #666;
    font-style: italic;
}

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

.mdlogin-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mdlogin-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 15px;
}

.mdlogin-modal-close:hover,
.mdlogin-modal-close:focus {
    color: #000;
    text-decoration: none;
}

/* User Info */
.mdlogin-user-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.mdlogin-user-info h3 {
    margin: 0 0 5px 0;
    color: #333;
}

.mdlogin-user-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Credentials Table */
.mdlogin-credentials-table {
    margin-top: 15px;
}

.mdlogin-credentials-table table {
    width: 100%;
    border-collapse: collapse;
}

.mdlogin-credentials-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #dee2e6;
}

.mdlogin-credentials-table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.mdlogin-credentials-table code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
    display: inline-block;
    max-width: 200px;
}

/* Settings Page */
.mdlogin-settings-info {
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    max-width: 380px;
}
.mdlogin-settings-info h3 {
    margin-top: 0;
    color: #333;
}

.mdlogin-settings-info table {
    width: 100%;
    border-collapse: collapse;
}
.mdlogin-settings-info th {
    text-align: left;
    padding: 8px 0;
    font-weight: 600;
    width: 200px;
}

.mdlogin-settings-info td {
    padding: 8px 0;
    color: #666;
}

/* Button Styles */
.view-credentials {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}

.view-credentials:hover {
    background-color: #005a87;
    color: white;
}

.delete-credential {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.delete-credential:hover {
    background-color: #c82333;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mdlogin-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }

    .mdlogin-credentials-table {
        overflow-x: auto;
    }

    .mdlogin-credentials-table table {
        min-width: 600px;
    }

    .mdlogin-credentials-table code {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .mdlogin-modal-content {
        width: 98%;
        margin: 5% auto;
        padding: 10px;
    }

    .mdlogin-credentials-table table {
        min-width: 500px;
    }

    .mdlogin-credentials-table code {
        max-width: 100px;
        font-size: 11px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .mdlogin-modal-content {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mdlogin-modal-content {
        border: 2px solid #000;
    }

    .mdlogin-credentials-table th {
        border-bottom: 2px solid #000;
    }

    .mdlogin-credentials-table td {
        border-bottom: 1px solid #000;
    }
}

/* Print Styles */
@media print {
    .mdlogin-modal {
        position: static;
        background: none;
    }

    .mdlogin-modal-content {
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }

    .mdlogin-modal-close {
        display: none;
    }
} 


/* Admin Settings page */
.toplevel_page_mdlogin-settings #wpcontent {
    padding-left: 0;
    padding-right: 0;
}

.toplevel_page_mdlogin-settings #wpbody-content > .notice {
    display: none;
}

.md-admin-dashboard-main-layout {
    padding: 0 20px 20px;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout {
    max-width: 100%;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout * {
    box-sizing: border-box;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 0;
    padding: 15px 20px;
    background-color: #fff;
    border: 1px solid #e2e4e7;
}

.md-admin-dashboard-main-layout .mdlogin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: normal;
}

.md-admin-dashboard-main-layout .mdlogin-brand-icon {
    display: block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.md-admin-dashboard-main-layout .mdlogin-brand-title {
    color: #0b1014;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.md-admin-dashboard-main-layout .mdlogin-brand-version {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: #50575e;
    background: #f0f0f1;
    border-radius: 4px;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__outer {
    margin: 0;
    padding: 0;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__tabs-list.nav-tab-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    line-height: inherit;
    background-color: #fff;
    border: 1px solid #e2e4e7;
    border-top: none;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__tabs-list.nav-tab-wrapper::after,
.md-admin-dashboard-main-layout .cf-dashboard-layout__tabs-list.nav-tab-wrapper::before {
    display: none;
    content: none;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__tabs-list .nav-tab {
    display: inline-block;
    float: none;
    padding: 15px 0;
    margin: 0 20px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    line-height: 17px;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__tabs-list .nav-tab:hover,
.md-admin-dashboard-main-layout .cf-dashboard-layout__tabs-list .nav-tab:focus {
    background: transparent;
    color: #000;
    box-shadow: none;
    outline: none;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__tabs-list .nav-tab.nav-tab-active {
    background: transparent;
    border-bottom-color: #d35829;
    color: #000;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__inner {
    margin: 0;
    padding: 0;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__inner > .cf-dashboard-layout__form {
    margin: 20px 0;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__inner form {
    margin: 0;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form {
    position: relative;
    background-color: #fff;
    border: 1px solid #e2e4e7;
    padding: 20px;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .form-table th {
    width: 335px;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form h2 {
    font-size: 20px;
    line-height: 26px;
    font-weight: 600;
    color: #0b1014;
    margin-top: 0;
    border-bottom: 1px solid #dde1e7;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form p {
    margin-top: 0;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .form-table input:focus {
    border-color: #d35829;
    box-shadow: none;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form input#submit {
    font-size: 14px;
    font-weight: 500;
    min-height: 40px;
    line-height: 40px;
    padding: 0 20px;
    background-color: #d35829;
    border: 0;
    transition: all 0.3s ease-in-out;
    color: #fff;
    margin-top: 20px;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form input#submit:hover {
    background-color: #b84a22;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .mdlogin-checkbox-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .mdlogin-checkbox-field__input {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 44px;
    height: 24px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .mdlogin-checkbox-field__switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #c3c4c7;
    transition: background-color 0.2s ease-in-out;
    flex-shrink: 0;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .mdlogin-checkbox-field__switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.15);
    transition: transform 0.2s ease-in-out;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .mdlogin-checkbox-field__input:checked + .mdlogin-checkbox-field__switch {
    background: #d35829;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .mdlogin-checkbox-field__input:checked + .mdlogin-checkbox-field__switch::before {
    transform: translateX(20px);
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .mdlogin-checkbox-field__input:focus + .mdlogin-checkbox-field__switch {
    box-shadow: 0 0 0 2px rgba(211, 88, 41, 0.25);
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .form-table td p {
    text-wrap: auto;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .form-table td select {
    width: auto;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .form-table td select:hover {
    color: #d35829;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form .form-table td select:focus {
    border-color: #d35829;
    box-shadow: none;
}

.md-admin-dashboard-main-layout .cf-dashboard-layout__form input[type=number] {
    border: 1px solid #b9b9b9;
}

.md-admin-dashboard-main-layout .mdlogin-shortcode-code {
    margin-bottom: 15px;
}

.md-admin-dashboard-main-layout .mdlogin-settings-info {
    max-width: none;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

/* About tab — same layout as Multiadmin */
.md-admin-dashboard-main-layout .about-md {
    text-align: left;
    max-width: 760px;
}

.md-admin-dashboard-main-layout .about-md__logo {
    margin: 0 0 24px;
}

.md-admin-dashboard-main-layout .about-md__logo img {
    display: block;
    max-width: 280px;
    width: 100%;
    height: auto;
}

.md-admin-dashboard-main-layout .about-md__subheading {
    margin: 28px 0 12px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #0b1014;
}

.md-admin-dashboard-main-layout .about-md .md-info {
    margin-top: 0;
}

.md-admin-dashboard-main-layout .about-md .md-info p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #0b1014;
}

.md-admin-dashboard-main-layout .about-md .md-info .contactus-btn.button-primary {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    background: #d35829;
    border-color: #d35829;
    color: #fff;
}

.md-admin-dashboard-main-layout .about-md .md-info .contactus-btn.button-primary:hover,
.md-admin-dashboard-main-layout .about-md .md-info .contactus-btn.button-primary:focus {
    background: #b84a22;
    border-color: #b84a22;
    color: #fff;
}

.mdlogin-management-layout table,
.mdlogin-management-layout .widefat thead th {
    border-color: #dde1e7;
}

.mdlogin-management-layout .widefat thead th {
    font-weight: 500;
}

.mdlogin-management-layout table {
    margin-top: 20px;
    background-color: #fff;
}

.mdlogin-management-layout th.sortable a,
.mdlogin-management-layout th.sorted a {
    padding: 12px 8px;
    color: #5e5e5e;
}

.mdlogin-management-layout .widefat thead td,
.mdlogin-management-layout .widefat thead th {
    border-bottom: 1px solid #dde1e7;
}

.mdlogin-management-layout .widefat tfoot td,
.mdlogin-management-layout .widefat tfoot th {
    border-top: 1px solid #dde1e7;
}

.wp-core-ui .mdlogin-management-layout .button {
    color: #d35829;
    border-color: #d35829;
    background-color: #fff;
}

.wp-core-ui .mdlogin-management-layout .button:hover {
    background: #d35829;
    border-color: #d35829;
    color: #fff;
}

.mdlogin-management-layout .striped>tbody>:nth-child(odd),
.mdlogin-management-layout ul.striped>:nth-child(odd) {
    background-color: #f6f7f7;
}

@media (max-width: 782px) {
    .md-admin-dashboard-main-layout .cf-dashboard-layout__form .form-table th {
        padding: 10px 0 6px;
    }

    .md-admin-dashboard-main-layout .cf-dashboard-layout__tabs-list .nav-tab {
        margin: 0 12px;
        padding: 12px 0;
    }
}

/* Authenticator Column Styles */
.authenticators-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.authenticator-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.authenticator-icon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.authenticator-google {
    background-color: #4285f4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E");
}

.authenticator-apple {
    background-color: #000;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E");
}

.authenticator-chrome {
    background-color: #4285f4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 0C8.21 0 4.67 1.92 2.66 4.94L7.35 9.63C8.21 8.79 9.35 8.25 10.5 8.25C11.65 8.25 12.79 8.79 13.65 9.63L18.34 4.94C16.33 1.92 12.79 0 9 0H12ZM12 24C15.79 24 19.33 22.08 21.34 19.06L16.65 14.37C15.79 15.21 14.65 15.75 13.5 15.75C12.35 15.75 11.21 15.21 10.35 14.37L5.66 19.06C7.67 22.08 11.21 24 15 24H12Z'/%3E%3C/svg%3E");
}

.authenticator-safari {
    background-color: #006cff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.authenticator-firefox {
    background-color: #ff7139;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.authenticator-edge {
    background-color: #0078d4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.authenticator-android {
    background-color: #3ddc84;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L14.12 1.75c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0z'/%3E%3C/svg%3E");
}

.authenticator-platform {
    background-color: #6c757d;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.authenticator-security-key {
    background-color: #fd7e14;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z'/%3E%3C/svg%3E");
}

.authenticator-unknown {
    background-color: #6c757d;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z'/%3E%3C/svg%3E");
}

.authenticator-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

.no-authenticator {
    color: #999;
    font-style: italic;
}

/* Responsive adjustments for authenticator column */
@media (max-width: 1200px) {
    .authenticator-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .authenticator-icon {
        width: 14px;
        height: 14px;
    }
    
    .authenticator-name {
        font-size: 11px;
    }
}

