/**
 * Login Modal Styles
 *
 * Popup modal for social login integration.
 *
 * @package GridMode WordPress Theme
 * @since 1.0.0
 */

/* Modal Container */
.pin-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Overlay */
.pin-login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Content Container */
.pin-login-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: pinLoginModalSlideIn 0.3s ease-out;
}

@keyframes pinLoginModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.pin-login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pin-login-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.pin-login-modal-close:focus {
    outline: 2px solid #dd3333;
    outline-offset: 2px;
}

/* Header */
.pin-login-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.pin-login-modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
    line-height: 1.3;
}

.pin-login-modal-subtitle {
    color: #666;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* Body */
.pin-login-modal-body {
    margin-bottom: 24px;
}

/* Social Login Buttons Container */
.pin-social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Override NextendSocialLogin default styles */
.pin-login-modal .nsl-container {
    margin: 0 !important;
    padding: 0 !important;
}

.pin-login-modal .nsl-container-block {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.pin-login-modal .nsl-container-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.pin-login-modal .nsl-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 14px 20px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
}

.pin-login-modal .nsl-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.pin-login-modal .nsl-button:active {
    transform: translateY(0) !important;
}

/* Google Button */
.pin-login-modal .nsl-button-google {
    background: #fff !important;
    border: 2px solid #e0e0e0 !important;
    color: #333 !important;
}

.pin-login-modal .nsl-button-google:hover {
    border-color: #4285f4 !important;
    background: #f8f9ff !important;
}

/* Facebook Button */
.pin-login-modal .nsl-button-facebook {
    background: #1877f2 !important;
    border: none !important;
    color: #fff !important;
}

.pin-login-modal .nsl-button-facebook:hover {
    background: #166fe5 !important;
}

/* Apple Button */
.pin-login-modal .nsl-button-apple {
    background: #000 !important;
    border: none !important;
    color: #fff !important;
}

.pin-login-modal .nsl-button-apple:hover {
    background: #333 !important;
}

/* Twitter/X Button */
.pin-login-modal .nsl-button-twitter {
    background: #000 !important;
    border: none !important;
    color: #fff !important;
}

.pin-login-modal .nsl-button-twitter:hover {
    background: #333 !important;
}

/* Button Icons */
.pin-login-modal .nsl-button svg,
.pin-login-modal .nsl-button img {
    width: 20px !important;
    height: 20px !important;
    margin-right: 12px !important;
}

/* Fallback (when NextendSocialLogin not configured) */
.pin-login-fallback {
    text-align: center;
    padding: 20px;
}

.pin-login-fallback p {
    color: #666;
    margin-bottom: 16px;
}

.pin-login-fallback-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #dd3333;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.pin-login-fallback-btn:hover {
    background: #c62828;
    color: #fff;
}

/* Footer */
.pin-login-modal-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pin-privacy-note {
    font-size: 12px;
    color: #888;
    margin: 0;
    line-height: 1.6;
}

.pin-privacy-note a {
    color: #666;
    text-decoration: underline;
}

.pin-privacy-note a:hover {
    color: #333;
}

/* Body scroll lock when modal is open */
body.pin-login-modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 480px) {
    .pin-login-modal {
        padding: 16px;
    }

    .pin-login-modal-content {
        padding: 32px 20px 24px;
        border-radius: 12px;
    }

    .pin-login-modal-header h3 {
        font-size: 20px;
    }

    .pin-login-modal-subtitle {
        font-size: 14px;
    }

    .pin-login-modal .nsl-button {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
}

/* Focus trap indicator */
.pin-login-modal-content:focus {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pin-login-modal-content {
        border: 2px solid #000;
    }

    .pin-login-modal .nsl-button {
        border: 2px solid currentColor !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pin-login-modal-content {
        animation: none;
    }

    .pin-login-modal .nsl-button {
        transition: none !important;
    }
}

/* ==========================================================================
   Comment Login Prompt Card
   ========================================================================== */

.comment-login-prompt {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
    animation: commentPromptFadeIn 0.4s ease-out;
}

@keyframes commentPromptFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-login-prompt__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #fef2f2;
    border-radius: 50%;
    margin-bottom: 16px;
    color: #dd3333;
}

.comment-login-prompt__icon svg {
    width: 24px;
    height: 24px;
}

.comment-login-prompt__title {
    font-size: 20px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.comment-login-prompt__text {
    font-size: 15px;
    color: #666666;
    margin: 0 0 24px 0;
    line-height: 1.6;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.comment-login-prompt__btn {
    display: inline-block;
    background: #dd3333;
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.comment-login-prompt__btn:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.3);
    color: #ffffff;
}

.comment-login-prompt__btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(221, 51, 51, 0.2);
}

.comment-login-prompt__btn:focus {
    outline: 2px solid #dd3333;
    outline-offset: 2px;
}

/* First comment variant - slightly more emphasis */
.comment-login-prompt--first {
    background: linear-gradient(135deg, #ffffff 0%, #fef9f9 100%);
    border-color: #f0d0d0;
}

.comment-login-prompt--first .comment-login-prompt__icon {
    background: #dd3333;
    color: #ffffff;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .comment-login-prompt {
        padding: 24px 16px;
        border-radius: 8px;
        margin-bottom: 16px;
    }

    .comment-login-prompt__icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }

    .comment-login-prompt__icon svg {
        width: 20px;
        height: 20px;
    }

    .comment-login-prompt__title {
        font-size: 18px;
    }

    .comment-login-prompt__text {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .comment-login-prompt__btn {
        display: block;
        width: 100%;
        padding: 12px 24px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .comment-login-prompt {
        border: 2px solid #000;
    }

    .comment-login-prompt__btn {
        border: 2px solid transparent;
    }

    .comment-login-prompt__btn:focus {
        border-color: #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .comment-login-prompt {
        animation: none;
    }

    .comment-login-prompt__btn {
        transition: none;
    }

    .comment-login-prompt__btn:hover {
        transform: none;
    }
}
