/* I Borghi User Submissions Forms */
.iborghi-auth-forms,
.iborghi-submission-form,
.iborghi-my-structures {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.iborghi-auth-forms .uk-card,
.iborghi-submission-form .uk-card,
.iborghi-my-structures .uk-card {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.iborghi-submission-form .uk-subnav-pill > .uk-active > a {
    background-color: #a82930;
    color: white;
}

.iborghi-auth-forms .uk-card-title,
.iborghi-submission-form .uk-card-title,
.iborghi-my-structures .uk-card-title {
    color: #333;
    font-weight: 600;
}

.uk-form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.uk-input,
.uk-textarea,
.uk-select {
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.uk-input:focus,
.uk-textarea:focus,
.uk-select:focus {
    border-color: #a82930;
    box-shadow: 0 0 0 1px rgba(30, 135, 240, 0.2);
}

.uk-form-danger {
    border-color: #f0506e !important;
    box-shadow: 0 0 0 1px rgba(240, 80, 110, 0.2);
}

.uk-button {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.uk-button-primary {
    background-color: #a82930;
}

.uk-button-primary:hover {
    background-color: #a82930;
    transform: translateY(-1px);
}

button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.uk-alert {
    border-radius: 4px;
    border: 1px solid transparent;
    padding: 15px;
    margin: 15px 0;
}

.uk-alert-success {
    background-color: #f2faf2;
    border-color: #4caf50;
    color: #2e7d32;
}

.uk-alert-danger {
    background-color: #fdf2f2;
    border-color: #f44336;
    color: #c53030;
}

.uk-alert-warning {
    background-color: #fffaf2;
    border-color: #ff9800;
    color: #ed8936;
}

/* Stili per l'upload delle immagini */
.image-upload-container, .gallery-upload-container {
    border: 2px dashed #ddd;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.uploaded-image {
    position: relative;
    display: inline-block;
    margin: 10px;
}

.uploaded-image img {
    border-radius: 4px;
}

.remove-image, .remove-gallery-image {
    position: absolute;
    top: 5px;
    right: 5px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    padding: 0;
    line-height: 1;
}

.gallery-image {
    position: relative;
    display: inline-block;
    margin: 5px;
}

.gallery-image img {
    border-radius: 4px;
}

/* Stili per la tabella delle strutture */
.iborghi-my-structures .uk-table th {
    background-color: #f8f9fa;
}

.iborghi-my-structures .uk-label {
    font-size: 0.8em;
    padding: 2px 8px;
}

.uk-label-success { background-color: #32d296; }
.uk-label-warning { background-color: #faa05a; }
.uk-label-default { background-color: #d8d8d8; }
.uk-label-primary { background-color: #a82930; }

/* Checkbox e Radio stile */
.uk-checkbox {
    margin-right: 8px;
}

.uk-display-inline-block {
    margin-bottom: 8px;
}

/* Grid improvements */
.uk-grid-small > * {
    padding-left: 15px;
}

/* Loading spinner */
.uk-spinner {
    margin-left: 8px;
}

.uk-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 960px) {
    .iborghi-auth-forms .uk-width-1-2@m {
        width: 100%;
    }
    
    .iborghi-auth-forms [uk-grid] > * {
        padding-left: 0;
        margin-bottom: 20px;
    }
    
    .iborghi-submission-form .uk-grid-small > * {
        padding-left: 0;
    }
    
    .gallery-image {
        width: 80px;
        height: 80px;
    }
    
    .gallery-image img {
        width: 80px;
        height: 80px;
    }
}

/* Section separators */
.iborghi-submission-form .uk-margin {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.iborghi-submission-form .uk-margin:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Login form specific */
#loginform {
    margin: 0;
}

#loginform label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

#loginform .forgetmenot {
    margin-top: 10px;
}

/* Stili per la pagina profilo */
.iborghi-profile-page .uk-nav-default li.uk-active a {
    color: #333;
    font-weight: 600;
}

.iborghi-profile-page .uk-nav-default li a:hover {
    color: #a82930;
}

.iborghi-profile-page .uk-divider-icon {
    margin: 30px 0;
}

.iborghi-profile-page .uk-form-label {
    font-weight: 600;
}

/* Navigazione responsive */
@media (max-width: 960px) {
    .iborghi-profile-page .uk-width-1-4@m {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .iborghi-profile-page .uk-width-3-4@m {
        width: 100%;
    }
}

/* Stili per il form di login di WordPress */
#loginform {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

#loginform p {
    margin-bottom: 1.5rem;
    position: relative;
}

#loginform p label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.875rem;
}

#loginform input[type="text"],
#loginform input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
    margin: 0;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus {
    border-color: #a82930;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 135, 240, 0.1);
}

/* Stile per la checkbox "Ricordami" */
#loginform .forgetmenot {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

#loginform .forgetmenot label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: normal;
    font-size: 0.875rem;
    cursor: pointer;
}

#loginform .forgetmenot input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    cursor: pointer;
}

/* STILE PER IL BOTTONE ACCEDI - Identico a UIkit */
#loginform .submit {
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding: 0;
    border: none;
    background: none;
}

#loginform .submit .button {
    /* Reset completo dello stile WordPress */
    background: #a82930 !important;
    color: #fff !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    display: inline-block !important;
    vertical-align: middle !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
    box-shadow: none !important;
    text-shadow: none !important;
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
    
    /* Stile hover identico a UIkit */
    &:hover {
        background: #a82930 !important;
        color: #fff !important;
        border-color: transparent !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Rimuove tutti gli effetti focus di WordPress */
    &:focus {
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(30, 135, 240, 0.1) !important;
        border-color: #a82930 !important;
    }
    
    /* Rimuove lo stile attivo di WordPress */
    &:active {
        transform: translateY(0) !important;
    }
}

/* Stile per il CAPTCHA di AIOS */
#loginform .aiowps-captcha-container {
    margin: 1.5rem 0;
    padding: 0;
}

#loginform .aiowps-captcha-container iframe {
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

/* Stile per i messaggi di errore */
#login .message,
#login #login_error {
    border: none;
    background: #f8f8f8;
    padding: 12px 16px;
    border-radius: 4px;
    border-left: 4px solid #a82930;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#login #login_error {
    border-left-color: #f0506e;
    background: #fef4f6;
}

/* Link sotto il form */
#loginform ~ p {
    text-align: center;
    margin-top: 1rem;
}

#loginform ~ p a {
    color: #a82930;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

#loginform ~ p a:hover {
    color: #a82930;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    #loginform input[type="text"],
    #loginform input[type="password"] {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    #loginform .submit .button {
        padding: 14px 24px !important;
        font-size: 16px !important;
    }
}

/* Se il bottone ha ancora problemi, usa questo nuclear option */
#loginform input[type="submit"] {
    background: #a82930 !important;
    color: #fff !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    
    &:hover {
        background: #790007 !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    }
}

/* Modal per messaggi di successo */
.iborghi-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.iborghi-success-modal.active {
    opacity: 1;
    visibility: visible;
}

.iborghi-success-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.iborghi-success-modal.active .iborghi-success-content {
    transform: translateY(0);
}

.iborghi-success-icon {
    font-size: 48px;
    color: #32d296;
    margin-bottom: 20px;
}

.iborghi-success-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.iborghi-success-message {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.iborghi-success-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

