/* =========================
   PASSWORD GENERATOR
========================= */
.password-gen .container { 
    max-width: 900px; 
    width: 90%; margin: 30px auto 0 auto; 
    padding: 25px 35px; 
    text-align: center; 
    border-radius: 12px; 
    background-color: white; 
    box-shadow: 0 6px 20px rgba(0,123,255,0.5); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}


.password-gen h1 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #003f7f;
}

.password-gen #length{
    width:100px;
    padding:8px 12px;
    margin-bottom:15px;
    text-align:center;
    border-radius:12px;
    border:1px solid #ddd;
    -moz-appearance: textfield;
    appearance: textfield;
}

.password-gen #length::-webkit-inner-spin-button,
.password-gen #length::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.password-gen .options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
    margin-top: 40px;
    width: 100%;
}

.password-gen .pwd-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #444;
    cursor: pointer;
    padding: 6px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.password-gen .pwd-option:hover {
    border-color: #7eb8f0;
    background: #f8fcff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.password-gen .pwd-option input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.password-gen .pwd-option .check-box {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid #b8d4f0;
    background: white;
    transition: all 0.2s ease;
    position: relative;
}

.password-gen .pwd-option input:checked + .check-box {
    background: #003f7f;
    border-color: #003f7f;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.35);
}

.password-gen .pwd-option input:checked + .check-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.password-gen .pwd-option:has(input:checked) {
    color: #003f7f;
}

.password-gen #password {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    border-radius: 12px;
    border: 2px dashed #7eb8f0;
    background: #f8fcff;
    color: #003f7f;
    text-align: center;
    margin-bottom: 5px;
    box-sizing: border-box;
}

/* Bottoni Password Generator: uno a sinistra e uno a destra */
.password-gen .button-wrapper{
    width: 100%;
    align-self: stretch;
    margin-top:20px;
    position:relative;
    display: flex;
    justify-content: space-between;
}

.password-gen .button-wrapper button {
    min-width: 140px;
    padding: 15px 24px;
}

.password-gen .button-wrapper button:last-child {
    margin-left: auto;
}

.password-gen .button-wrapper::after{
    content:"";
    display:block;
    clear:both;
}

.password-gen button{
    padding:15px;
    font-size:18px;
    border-radius:12px;
    border:none;
    background-color:#003f7f;
    color:white;
    cursor:pointer;
}

.password-gen button:hover{
    background-color:#0056b3;
    transform:scale(1.05);
}

.password-gen .button-wrapper button.copied {
    background: #dc3545;
}

.password-gen .button-wrapper button.copied:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .password-gen .container {
        padding: 24px 24px;
    }
}

@media (max-width: 600px) {
    .password-gen .container {
        margin: 12px 10px;
        padding: 24px 18px;
        width: 95%;
    }
    .password-gen h1 {
        font-size: 1.5em;
    }
    .password-gen .options {
        flex-direction: column;
    }
    .password-gen .pwd-option {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .password-gen .container {
        margin: 8px 8px;
        padding: 20px 14px;
    }
}
