/**
 * Frontend CSS per Gestione Soci Agrintesa
 * Stili minimi da rifinire in un secondo momento
 */

/* Reset e base */
.agrintesa-soci *,
.agrintesa-soci *::before,
.agrintesa-soci *::after {
    box-sizing: border-box;
}

/* Container principali */
.soci-registration-form-container,
.soci-login-form-container,
.soci-member-area-container,
.soci-password-recovery-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* Messaggi di stato */
.soci-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.soci-message.soci-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.soci-message.soci-error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.soci-message ul {
    margin: 0;
    padding-left: 20px;
}

/* Form styling */
.soci-registration-form,
.soci-login-form,
.soci-password-recovery-form,
.soci-password-reset-form,
.profile-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    margin-bottom: 24px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: #666;
    font-size: 14px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #fff;
    color: #333;
    height: 38px;
    border-radius: 20px;
}

.form-row input:focus {
    outline: none;
    border-color: #6CAA6C;
    box-shadow: 0 0 0 2px rgba(108, 170, 108, 0.2);
}


.field-description {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Checkbox styling */
.checkbox-row {
    margin-bottom: 30px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin-right: 10px;
    margin-top: 0;
}

.checkmark {
    margin-left: 5px;
}

/* Password strength meter */
.password-strength-meter {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background-color: #dc3545;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-text {
    font-size: 12px;
    margin-top: 4px;
    color: #666;
}

/* Password strength levels */
.password-strength-weak .password-strength-bar::after {
    width: 25%;
    background-color: #dc3545;
}

.password-strength-fair .password-strength-bar::after {
    width: 50%;
    background-color: #ffc107;
}

.password-strength-good .password-strength-bar::after {
    width: 75%;
    background-color: #fd7e14;
}

.password-strength-strong .password-strength-bar::after {
    width: 100%;
    background-color: #28a745;
}

/* Buttons */
.submit-button,
.logout-button {
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    position: relative;
    text-transform: none;
    margin-top: 10px;
    text-align: center;
    border-radius: 20px;
    background: var(--Verde-Scuro, #3C7A56);
}

.submit-button:hover,
.logout-button:hover {
    background: #5A9A5A;
}

.submit-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.logout-button {
    background: #6c757d;
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.logout-button:hover {
    background: #545b62;
}

/* Spinner */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.submit-button.loading .spinner {
    display: inline-block;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Form footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-footer a {
    color: #2c5f2d;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Member Area Styles */
.member-area-header {
    background: #2c5f2d;
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.member-area-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
}

.member-info {
    margin: 0;
    opacity: 0.9;
}

/* Navigation tabs */
.member-area-nav {
    margin-bottom: 30px;
}

.nav-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.nav-tabs li {
    margin-right: 5px;
}

.nav-tab {
    display: block;
    padding: 12px 20px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    background: #e9ecef;
    color: #333;
}

.nav-tab-active {
    background: white !important;
    color: #2c5f2d !important;
    border-bottom: 2px solid white;
    margin-bottom: -2px;
}

/* Tab content */
.tab-content {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 0 8px 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-content-active {
    display: block;
}

.tab-content h3 {
    margin-top: 0;
    color: #2c5f2d;
}

/* Dashboard widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-widget {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2c5f2d;
}

.dashboard-widget h4 {
    margin-top: 0;
    color: #2c5f2d;
}

.dashboard-widget ul {
    list-style: none;
    padding: 0;
}

.dashboard-widget li {
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.dashboard-widget li:last-child {
    border-bottom: none;
}

.quick-links .quick-link {
    display: block;
    color: #2c5f2d;
    text-decoration: none;
    padding: 8px 0;
}

.quick-links .quick-link:hover {
    text-decoration: underline;
}

.status-approved {
    color: #28a745;
    font-weight: 600;
}

.status-pending {
    color: #ffc107;
    font-weight: 600;
}

.status-rejected {
    color: #dc3545;
    font-weight: 600;
}

/* Documents section */
.documents-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.document-category h4 {
    color: #2c5f2d;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.document-list {
    list-style: none;
    padding: 0;
}

.document-list li {
    margin-bottom: 8px;
}

.document-link {
    color: #2c5f2d;
    text-decoration: none;
    display: block;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.document-link:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

/* Communications */
.communication-item {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.communication-item:last-child {
    border-bottom: none;
}

.communication-item h4 {
    color: #2c5f2d;
    margin-bottom: 5px;
}

.communication-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.read-more {
    color: #2c5f2d;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* Profile section */
.profile-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.profile-info,
.profile-security {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.security-actions a {
    color: #2c5f2d;
    text-decoration: none;
}

.security-actions a:hover {
    text-decoration: underline;
}

/* Member area footer */
.member-area-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* reCAPTCHA */
.g-recaptcha {
    margin: 15px 0;
}

.grecaptcha-badge {
    visibility: visible !important;
}

/* Responsive design */
@media (max-width: 768px) {

    .soci-registration-form-container,
    .soci-login-form-container,
    .soci-member-area-container,
    .soci-password-recovery-container {
        padding: 15px;
    }

    .soci-registration-form,
    .soci-login-form,
    .soci-password-recovery-form,
    .soci-password-reset-form {
        padding: 20px;
        max-width: 100%;
    }

    .nav-tabs {
        flex-direction: column;
    }

    .nav-tabs li {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .profile-section {
        grid-template-columns: 1fr;
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
    }

    .documents-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .member-area-header {
        padding: 20px;
    }

    .member-area-header h2 {
        font-size: 24px;
    }

    .tab-content {
        padding: 20px;
    }
}

/* Debug */
#debug-content {
    font-size: 14px !important;
}

#debug-content div {
    font-size: 14px !important;
}

#gestione-soci-debug {
    width: 600px !important
}