/**
 * Pixaware Social Login — Stylesheet
 *
 * Covers:
 *  - Admin settings page UI
 *  - Frontend login buttons (Apple, Google, Facebook)
 *  - Light & Dark themes
 *  - Small / Medium / Large button sizes
 *  - Responsive & accessible
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES
   ============================================================================= */
:root {
    --psl-radius: 6px;
    --psl-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --psl-transition: 0.2s ease;
    --psl-gap: 12px;

    /* Button sizing */
    --psl-sm-height: 40px;
    --psl-sm-font: 14px;
    --psl-sm-icon: 18px;
    --psl-sm-padding: 0 16px;

    --psl-md-height: 48px;
    --psl-md-font: 15px;
    --psl-md-icon: 20px;
    --psl-md-padding: 0 20px;

    --psl-lg-height: 56px;
    --psl-lg-font: 16px;
    --psl-lg-icon: 22px;
    --psl-lg-padding: 0 24px;
}

/* =============================================================================
   WRAPPER
   ============================================================================= */
.pixaware-sl-wrap {
    font-family: var(--psl-font);
    box-sizing: border-box;
    max-width: 420px;
    padding: 0;
    margin: 0 auto;
}

.pixaware-sl-wrap *,
.pixaware-sl-wrap *::before,
.pixaware-sl-wrap *::after {
    box-sizing: inherit;
}

/* Alignment variants */
.pixaware-sl--align-left {
    margin-left: 0;
    margin-right: auto;
}

.pixaware-sl--align-right {
    margin-left: auto;
    margin-right: 0;
}

.pixaware-sl--align-center {
    margin-left: auto;
    margin-right: auto;
}

/* =============================================================================
   BUTTON LIST
   ============================================================================= */
.pixaware-sl-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--psl-gap);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* =============================================================================
   BASE BUTTON STYLE
   ============================================================================= */
.pixaware-sl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    border: none;
    border-radius: var(--psl-radius);
    cursor: pointer;
    font-family: var(--psl-font);
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition:
        background-color var(--psl-transition),
        box-shadow var(--psl-transition),
        transform var(--psl-transition),
        opacity var(--psl-transition);
    user-select: none;
    position: relative;
    overflow: hidden;
    outline-offset: 3px;
}

.pixaware-sl-btn:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 3px;
}

.pixaware-sl-btn:active {
    transform: scale(0.98);
}

/* Icon container */
.pixaware-sl-btn__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pixaware-sl-btn__icon svg {
    display: block;
}

/* Label */
.pixaware-sl-btn__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================================================
   SIZE MODIFIERS
   ============================================================================= */

/* Small */
.pixaware-sl-btn--small {
    height: var(--psl-sm-height);
    font-size: var(--psl-sm-font);
    padding: var(--psl-sm-padding);
}

.pixaware-sl-btn--small .pixaware-sl-btn__icon svg {
    width: var(--psl-sm-icon);
    height: var(--psl-sm-icon);
}

/* Medium (default) */
.pixaware-sl-btn--medium {
    height: var(--psl-md-height);
    font-size: var(--psl-md-font);
    padding: var(--psl-md-padding);
}

.pixaware-sl-btn--medium .pixaware-sl-btn__icon svg {
    width: var(--psl-md-icon);
    height: var(--psl-md-icon);
}

/* Large */
.pixaware-sl-btn--large {
    height: var(--psl-lg-height);
    font-size: var(--psl-lg-font);
    padding: var(--psl-lg-padding);
}

.pixaware-sl-btn--large .pixaware-sl-btn__icon svg {
    width: var(--psl-lg-icon);
    height: var(--psl-lg-icon);
}

/* =============================================================================
   APPLE BUTTON
   Official Apple Human Interface Guidelines
   Light: black bg, white text; Dark mode: white bg, black text
   ============================================================================= */

/* Light theme Apple */
.pixaware-sl--light .pixaware-sl-btn--apple,
.pixaware-sl-btn--apple {
    background-color: #000000;
    color: #ffffff;
    border: 1.5px solid transparent;
}

.pixaware-sl--light .pixaware-sl-btn--apple:hover,
.pixaware-sl-btn--apple:hover {
    background-color: #1a1a1a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Dark theme Apple: inverted — white bg, black text */
.pixaware-sl--dark .pixaware-sl-btn--apple {
    background-color: #ffffff;
    color: #000000;
    border-color: #e0e0e0;
}

.pixaware-sl--dark .pixaware-sl-btn--apple:hover {
    background-color: #f5f5f5;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.15);
}

/* =============================================================================
   GOOGLE BUTTON
   Official Google branding: white bg, #3c4043 text, subtle border
   ============================================================================= */
.pixaware-sl-btn--google {
    background-color: #ffffff;
    color: #3c4043;
    border: 1.5px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pixaware-sl-btn--google:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.18);
    border-color: #c5c6c7;
}

/* Dark theme Google */
.pixaware-sl--dark .pixaware-sl-btn--google {
    background-color: #131314;
    color: #e3e3e3;
    border-color: #3c3c3c;
}

.pixaware-sl--dark .pixaware-sl-btn--google:hover {
    background-color: #1e1e1e;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.25);
}

/* =============================================================================
   FACEBOOK BUTTON
   Official Meta: #1877F2 blue, white text
   ============================================================================= */
.pixaware-sl-btn--facebook {
    background-color: #1877F2;
    color: #ffffff;
    border: 1.5px solid transparent;
}

.pixaware-sl-btn--facebook:hover {
    background-color: #166FE5;
    box-shadow: 0 2px 12px rgba(24, 119, 242, 0.40);
}

/* Dark theme Facebook — same brand color */
.pixaware-sl--dark .pixaware-sl-btn--facebook {
    background-color: #1877F2;
    color: #ffffff;
}

.pixaware-sl--dark .pixaware-sl-btn--facebook:hover {
    background-color: #1467D4;
}

/* =============================================================================
   ERROR MESSAGE
   ============================================================================= */
.pixaware-sl-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: var(--psl-radius);
    color: #b91c1c;
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.pixaware-sl-error svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.pixaware-sl--dark .pixaware-sl-error {
    background-color: #3b0000;
    border-color: #7f1d1d;
    color: #fca5a5;
}

/* =============================================================================
   PRIVACY NOTE
   ============================================================================= */
.pixaware-sl-privacy {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    margin: 12px 0 0;
}

.pixaware-sl-privacy a {
    color: #6b7280;
    text-decoration: underline;
}

.pixaware-sl--dark .pixaware-sl-privacy {
    color: #9ca3af;
}

/* =============================================================================
   LOADING STATE (applied via JS)
   ============================================================================= */
.pixaware-sl-btn--loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

.pixaware-sl-btn--loading .pixaware-sl-btn__label::after {
    content: '…';
}

/* =============================================================================
   RIPPLE EFFECT
   ============================================================================= */
.pixaware-sl-btn .psl-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: psl-ripple 0.55s linear;
    pointer-events: none;
}

.pixaware-sl-btn--google .psl-ripple {
    background: rgba(66, 133, 244, 0.15);
}

@keyframes psl-ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* =============================================================================
   ADMIN SETTINGS PAGE
   ============================================================================= */
.pixaware-sl-admin {
    max-width: 900px;
}

.pixaware-sl-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px !important;
    color: #1e293b !important;
}

.pixaware-sl-logo {
    font-size: 28px;
}

.pixaware-sl-version {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
}

.pixaware-sl-tabs {
    margin-bottom: 24px !important;
}

.pixaware-sl-tab-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 28px 32px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.pixaware-sl-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e40af;
    font-size: 13px;
    padding: 10px 14px;
    margin-top: 10px;
}

.pixaware-sl-copy-btn {
    margin-left: 8px;
    vertical-align: middle;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 480px) {
    .pixaware-sl-wrap {
        max-width: 100%;
    }

    .pixaware-sl-btn__label {
        font-size: 14px;
    }

    .pixaware-sl-tab-content {
        padding: 20px 16px;
    }
}

/* =============================================================================
   SHORTCODE PANEL
   ============================================================================= */

.pixaware-sl-shortcode-panel {
    margin-bottom: 8px;
}

.pixaware-sl-sc-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 0 6px !important;
    display: flex;
    align-items: center;
}

.pixaware-sl-sc-desc {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 18px !important;
}

/* ── Copy row ── */
.pixaware-sl-sc-row {
    margin-bottom: 12px;
}

.pixaware-sl-sc-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 6px;
}

.pixaware-sl-sc-copy-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pixaware-sl-sc-input {
    flex: 1;
    min-width: 240px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
    font-size: 13px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    color: #0f172a !important;
    cursor: text;
    height: auto !important;
}

.pixaware-sl-sc-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
}

.pixaware-sl-sc-input--mono {
    font-size: 12px !important;
    color: #7c3aed !important;
}

/* ── Builder section ── */
.pixaware-sl-sc-builder {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px 20px;
    margin: 16px 0;
}

.pixaware-sl-sc-builder .form-table {
    background: transparent;
}

.pixaware-sl-sc-builder .form-table th {
    padding: 8px 10px 8px 0;
    width: 160px;
    font-size: 13px;
    color: #374151;
}

.pixaware-sl-sc-builder .form-table td {
    padding: 8px 0;
}

/* ── PHP block ── */
.pixaware-sl-sc-php-block {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    padding: 14px 18px 18px;
    margin: 0 0 16px;
}

/* ── Attribute reference ── */
.pixaware-sl-sc-reference table.widefat {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

.pixaware-sl-sc-reference table.widefat th {
    background: #f1f5f9;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 10px 14px;
}

.pixaware-sl-sc-reference table.widefat td {
    font-size: 13px;
    padding: 9px 14px;
    vertical-align: top;
    color: #374151;
}

.pixaware-sl-sc-reference table.widefat code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
    color: #7c3aed;
}