/**
* 2007-2025 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2025 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/

/* Google Identity Wrapper */
.google-identity-wrapper {
    padding: 15px 0;
}

/* Separator */
.google-identity-separator {
    position: relative;
    text-align: center;
}

.google-identity-separator span {
    background-color: #fff;
    padding: 0 10px;
    color: #666;
    font-size: 14px;
}

/* Google Sign In Button Container */
.g_id_signin {
    margin: 15px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Loading Indicator */
.google-identity-loader {
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 5px;
    margin: 10px 0;
}

.google-identity-loader .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.google-identity-loader p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Error Message */
.google-identity-error {
    margin: 15px 0;
    padding: 12px 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    font-size: 14px;
}

/* Google Login Sidebar - Overlay */
#google-sidebar-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

#google-sidebar-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Google Login Sidebar - Panel */
#google-login-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -350px !important;
    bottom: 0 !important;
    left: auto !important;
    width: 350px !important;
    height: 100% !important;
    background: #ffffff !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#google-login-sidebar.active {
    right: 0 !important;
}

/* Sidebar Header */
#google-login-sidebar .sidebar-header {
    padding: 20px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f8f9fa !important;
}

#google-login-sidebar .sidebar-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #202124 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#google-login-sidebar .close-btn {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: #5f6368 !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 1 !important;
    transition: color 0.2s, transform 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#google-login-sidebar .close-btn:hover {
    color: #202124 !important;
    transform: rotate(90deg) !important;
}

/* Sidebar Content */
#google-login-sidebar .sidebar-content {
    padding: 30px 20px !important;
}

#google-login-sidebar .sidebar-description {
    font-size: 14px !important;
    color: #5f6368 !important;
    margin-bottom: 20px !important;
    line-height: 1.5 !important;
}

#google-login-sidebar .sidebar-benefits {
    margin-bottom: 25px !important;
}

#google-login-sidebar .sidebar-benefits ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#google-login-sidebar .sidebar-benefits li {
    padding: 8px 0 !important;
    font-size: 13px !important;
    color: #5f6368 !important;
    display: flex !important;
    align-items: center !important;
}

#google-login-sidebar .sidebar-benefits li:before {
    content: "✓" !important;
    color: #34a853 !important;
    font-weight: bold !important;
    margin-right: 10px !important;
    font-size: 16px !important;
}

#google-login-sidebar .button-container {
    margin: 20px 0 !important;
}

#google-login-sidebar .security-notice {
    margin-top: 20px !important;
    padding: 12px !important;
    background: #e8f0fe !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    color: #1967d2 !important;
    display: flex !important;
    align-items: flex-start !important;
}

#google-login-sidebar .security-notice i {
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* Toggle Button */
#google-sidebar-toggle {
    position: fixed !important;
    top: 25% !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    background: #4285f4 !important;
    color: white !important;
    border: none !important;
    padding: 12px 10px !important;
    cursor: pointer !important;
    z-index: 9997 !important;
    border-radius: 8px 0 0 8px !important;
    box-shadow: -3px 3px 12px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    max-width: none !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 5px !important;
}

#google-sidebar-toggle .toggle-icon {
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: 'Product Sans', Arial, sans-serif !important;
    display: block !important;
}

#google-sidebar-toggle .toggle-text {
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    display: block !important;
    line-height: 1.2 !important;
}

#google-sidebar-toggle:hover {
    background: #1967d2 !important;
    right: -2px !important;
    box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
}

#google-sidebar-toggle.hidden {
    right: -100px !important;
    opacity: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .google-identity-wrapper {
        padding: 10px 0;
    }

    .google-identity-separator span {
        font-size: 12px;
    }

    #google-login-sidebar {
        width: 100% !important;
        right: -100% !important;
    }

    #google-login-sidebar.active {
        right: 0 !important;
    }

    #google-sidebar-toggle {
        padding: 10px 8px !important;
    }

    #google-sidebar-toggle .toggle-icon {
        font-size: 18px !important;
    }

    #google-sidebar-toggle .toggle-text {
        font-size: 9px !important;
    }
}

/* ============================================
   RUT Modal Styles
   ============================================ */

.google-rut-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-rut-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.google-rut-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: rutModalSlideIn 0.3s ease-out;
}

@keyframes rutModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.google-rut-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.google-rut-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #202124;
}

.google-rut-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #5f6368;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.google-rut-modal-close:hover {
    background: #e8eaed;
    color: #202124;
}

.google-rut-modal-body {
    padding: 25px;
}

.google-rut-modal-welcome {
    font-size: 16px;
    color: #202124;
    margin-bottom: 8px;
}

.google-rut-modal-welcome span {
    font-weight: 600;
    color: #1a73e8;
}

.google-rut-modal-description {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 25px;
    line-height: 1.5;
}

#google-rut-form .form-group {
    margin-bottom: 20px;
}

#google-rut-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

#google-rut-form label .required {
    color: #d93025;
}

#google-rut-form .form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

#google-rut-form .form-control:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

#google-rut-form .form-control.is-invalid {
    border-color: #d93025;
}

#google-rut-form .form-text {
    display: block;
    font-size: 12px;
    color: #5f6368;
    margin-top: 6px;
}

#google-rut-form .invalid-feedback {
    color: #d93025;
    font-size: 13px;
    margin-top: 6px;
}

.google-rut-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.google-rut-modal-actions .btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.google-rut-modal-actions .btn-secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.google-rut-modal-actions .btn-secondary:hover {
    background: #e8eaed;
    color: #202124;
}

.google-rut-modal-actions .btn-primary {
    background: #1a73e8;
    color: #ffffff;
}

.google-rut-modal-actions .btn-primary:hover {
    background: #1557b0;
}

.google-rut-modal-actions .btn-primary:disabled {
    background: #a8c7fa;
    cursor: not-allowed;
}

.google-rut-modal-actions .btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.google-rut-modal-actions .spinner-border {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* RUT Modal Responsive */
@media (max-width: 576px) {
    .google-rut-modal-content {
        width: 95%;
        margin: 10px;
    }

    .google-rut-modal-header {
        padding: 15px 20px;
    }

    .google-rut-modal-header h3 {
        font-size: 18px;
    }

    .google-rut-modal-body {
        padding: 20px;
    }

    .google-rut-modal-actions {
        flex-direction: column-reverse;
    }

    .google-rut-modal-actions .btn {
        width: 100%;
    }
}
