/**
 * Authyo Admin Settings Styles
 * Modern card-based tabbed layout
 */

/* =========================================================================
   Settings Page Wrapper
   ========================================================================= */

.authyo-settings-wrap {
    max-width: 900px;
    margin: 20px auto 0;
}

/* =========================================================================
   Header
   ========================================================================= */
.authyo-card{
    max-width: 100% !important;
    margin: 2vh auto !important;
    padding: 24px 22px !important;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, .08) !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .06)!important;
}
.authyo-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1d2327 0%, #2c3338 100%);
    border-radius: 8px;
    color: #fff;
}

.authyo-settings-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.authyo-settings-header h1 .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #72aee6;
}

.authyo-settings-version {
    color: #a7aaad;
    font-size: 13px;
    margin: 0;
}

/* =========================================================================
   Tabs Navigation
   ========================================================================= */

.authyo-tabs-nav {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.authyo-tab-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    color: #50575e;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.authyo-tab-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.authyo-tab-link:hover {
    color: #2271b1;
    background: #f6f7f7;
    border-bottom-color: #c3c4c7;
}

.authyo-tab-link:focus {
    box-shadow: none;
    outline: none;
}

.authyo-tab-active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 600;
}

.authyo-tab-active .dashicons {
    color: #2271b1;
}

/* =========================================================================
   Tab Panels
   ========================================================================= */

.authyo-tab-panel {
    display: none;
}

.authyo-tab-panel-active {
    display: block;
}

/* =========================================================================
   Cards
   ========================================================================= */

.authyo-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.authyo-card-header {
    padding: 20px 24px 12px;
    border-bottom: 1px solid #f0f0f1;
}

.authyo-card-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 4px;
    padding: 0;
}

.authyo-card-header h2 .dashicons {
    color: #2271b1;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.authyo-card-description {
    color: #646970;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.authyo-card-body {
    padding: 8px 24px 24px;
}

/* =========================================================================
   Form Tables (inside cards)
   ========================================================================= */

.authyo-form-table th {
    padding: 16px 10px 16px 0;
    font-weight: 600;
    color: #1d2327;
    font-size: 13px;
    width: 200px;
}

.authyo-form-table td {
    padding: 16px 10px;
}

.authyo-form-table tr {
    border-bottom: 1px solid #f0f0f1;
}

.authyo-form-table tr:last-child {
    border-bottom: none;
}

.authyo-form-table input[type="text"],
.authyo-form-table input[type="password"],
.authyo-form-table input[type="number"],
.authyo-form-table input[type="email"],
.authyo-form-table select {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    transition: border-color 0.2s ease;
}

.authyo-form-table input[type="text"]:focus,
.authyo-form-table input[type="password"]:focus,
.authyo-form-table input[type="number"]:focus,
.authyo-form-table input[type="email"]:focus,
.authyo-form-table select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.authyo-form-table .description {
    color: #646970;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.5;
}

/* Checkbox styling */
.authyo-form-table input[type="checkbox"] {
    margin-right: 6px;
}

/* =========================================================================
   Help Text / Alert Boxes
   ========================================================================= */

.authyo-help-text {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.authyo-help-text .dashicons {
    flex-shrink: 0;
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.authyo-help-text a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

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

/* =========================================================================
   Settings Footer (Save Button)
   ========================================================================= */

.authyo-settings-footer {
    margin-top: 20px;
    padding: 16px 0;
    display: flex;
    justify-content: flex-start;
}

.authyo-settings-footer .button-primary {
    padding: 6px 24px;
    height: auto;
    font-size: 14px;
    border-radius: 4px;
}

/* =========================================================================
   Status Indicators
   ========================================================================= */

.authyo-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.authyo-status-active {
    background: #edfaef;
    color: #00a32a;
}

.authyo-status-inactive {
    background: #fce4e4;
    color: #d63638;
}

/* =========================================================================
   Google Auth Section (inside card)
   ========================================================================= */

.authyo-card-body #authyo-2fasdk {
    border-radius: 6px;
    border-color: #e0e0e0;
}

.authyo-card-body #authyo-admin-message p {
    padding: 10px 14px;
    border-radius: 4px;
    margin: 0 0 10px;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media screen and (max-width: 782px) {
    .authyo-settings-wrap {
        margin: 10px;
    }

    .authyo-settings-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 16px;
    }

    .authyo-settings-header h1 {
        font-size: 18px;
    }

    .authyo-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .authyo-tab-link {
        padding: 10px 14px;
        font-size: 12px;
    }

    .authyo-tab-link .dashicons {
        display: none;
    }

    .authyo-card-header,
    .authyo-card-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .authyo-form-table th {
        width: auto;
        display: block;
        padding-bottom: 4px;
    }

    .authyo-form-table td {
        display: block;
        padding-top: 0;
    }
}

/* =========================================================================
   WP Notices inside our wrap (override WP defaults)
   ========================================================================= */

/* Hide the wp-header-end anchor used to position notices */
.authyo-settings-wrap .wp-header-end {
    display: none;
}

.authyo-settings-wrap .notice,
.authyo-settings-wrap .updated {
    margin: 12px 0 16px;
    border-radius: 6px;
    background: #fff;
    padding: 8px 12px;
}

.authyo-settings-wrap .updated,
.authyo-settings-wrap .notice-success {
    border-left-color: #00a32a;
}

.authyo-settings-wrap .error,
.authyo-settings-wrap .notice-error {
    border-left-color: #d63638;
}
