/* ============================================
   STILI BASE PIERO ACCESS
   ============================================ */

/* Reset solo per il contenitore Piero Access */
.piero-login-wrapper,
.piero-login-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html.piero-access-page,
body.piero-access-page {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.piero-access-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    line-height: 1.6;
}

.piero-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.piero-login-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    padding-bottom: 50px;
}

.piero-logo {
    text-align: center;
    margin-bottom: 24px;
}

.piero-logo img {
    max-width: 200px;
    height: auto;
}

.piero-login-container h1 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #333;
    text-align: center;
    font-weight: 600;
}

.piero-login-message {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.piero-error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 3px solid #c33;
}

.piero-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 3px solid #28a745;
}

.piero-login-form {
    width: 100%;
}

.piero-form-group {
    margin-bottom: 20px;
}

.piero-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.piero-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.piero-form-group input:focus {
    outline: none;
    border-color: #666;
}

.piero-btn {
    width: 100%;
    padding: 12px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.piero-btn:hover {
    background: #555;
}

.piero-branding {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 9px;
    color: #ccc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.piero-branding:hover {
    color: #999;
}

/* Password Toggle */
.piero-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.piero-password-wrapper input {
    flex: 1;
    padding-right: 45px;
}

.piero-toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.piero-toggle-password:hover {
    opacity: 1;
}

/* Link Password Dimenticata */
.piero-forgot-link {
    text-align: center;
    margin-top: 15px;
}

.piero-forgot-link a {
    color: #666;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.piero-forgot-link a:hover {
    color: #333;
    text-decoration: underline;
}

/* Link Torna al Login */
.piero-back-link {
    text-align: center;
    margin-top: 20px;
}

.piero-back-link a {
    color: #2271b1;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.piero-back-link a:hover {
    color: #135e96;
    text-decoration: underline;
}


/* ============================================
   STILI WOOCOMMERCE FORM CON TAB
   ============================================ */

/* Container WooCommerce */
.piero-woo-form-wrapper {
    max-width: 440px;
    margin: 40px auto;
    padding: 20px;
}

.piero-woo-form-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-bottom: 60px;
}

/* Tab Switcher */
.piero-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e5e5;
}

.piero-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.piero-tab:hover {
    color: #333;
    background: #f9f9f9;
}

.piero-tab.active {
    color: #333;
    border-bottom-color: #333;
}

/* Form Content */
.piero-form-content {
    display: none;
    animation: pieroFadeIn 0.3s ease;
}

.piero-form-content.active {
    display: block;
}

@keyframes pieroFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remember Me */
.piero-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.piero-remember input[type="checkbox"] {
    cursor: pointer;
}

/* Google Button */
.piero-btn-google {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.piero-btn-google:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

/* Divider */
.piero-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.piero-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #ddd;
    z-index: 0;
}

.piero-divider span {
    position: relative;
    display: inline-block;
    padding: 0 10px;
    background: #fff;
    color: #666;
    font-size: 13px;
    z-index: 1;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .piero-login-container,
    .piero-woo-form-container {
        padding: 30px 20px;
        padding-bottom: 50px;
    }
    
    .piero-tab {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .piero-login-wrapper,
    .piero-woo-form-wrapper {
        padding: 15px;
    }
}