/* Stili per il plugin Agg Notizie */

/* Container principale */
#agg-notizie-auth-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Form di autenticazione */
.agg-form-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.agg-form-container h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

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

.agg-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.agg-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.agg-form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,0.3);
}

.agg-form-group input[type="tel"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.agg-form-group small {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Bottoni */
.agg-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s;
}

.agg-btn-primary {
    background-color: #0073aa;
    color: white;
}

.agg-btn-primary:hover {
    background-color: #005a87;
}

.agg-btn-secondary {
    background-color: #666;
    color: white;
}

.agg-btn-secondary:hover {
    background-color: #555;
}

/* Switch tra form */
.agg-form-switch {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.agg-form-switch a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}

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

/* Link di navigazione tra pagine */
.agg-login-link,
.agg-registration-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border: 2px solid #0073aa;
    border-radius: 4px;
    display: inline-block;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.agg-login-link:hover,
.agg-registration-link:hover {
    background-color: #0073aa;
    color: white;
    text-decoration: none;
}

/* Messaggi */
.agg-messages {
    margin-top: 20px;
}

.agg-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.agg-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.agg-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Informazioni utente */
.agg-user-info {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.agg-user-info h3 {
    color: #333;
    margin-bottom: 10px;
}

.agg-user-info p {
    color: #666;
    margin-bottom: 15px;
}

/* Container notizie */
.agg-news-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.agg-news-container h3 {
    background: #0073aa;
    color: white;
    margin: 0;
    padding: 15px 20px;
}

/* Statistiche notizie */
.agg-news-stats {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.agg-news-stats p {
    margin: 5px 10px;
    color: #666;
}

.agg-news-stats strong {
    color: #0073aa;
}

/* Lista notizie */
.agg-news-list {
    max-height: 600px;
    overflow-y: auto;
}

.agg-news-item {
    border-bottom: 1px solid #eee;
    padding: 20px;
    transition: background-color 0.3s;
}

.agg-news-item:hover {
    background-color: #f8f9fa;
}

.agg-news-item.unread {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.agg-news-item.read {
    opacity: 0.8;
}

.agg-news-header {
    margin-bottom: 15px;
}

.agg-news-title {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.agg-unread-badge {
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.agg-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: #666;
}

.agg-news-date {
    font-weight: bold;
}

.agg-read-status {
    color: #28a745;
    font-style: italic;
}

.agg-news-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.agg-news-actions {
    text-align: right;
}

/* Modal */
.agg-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agg-modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.agg-modal-header {
    background: #0073aa;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agg-modal-header h3 {
    margin: 0;
    flex: 1;
}

.agg-modal-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.agg-modal-close:hover {
    opacity: 0.7;
}

.agg-modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.agg-modal-body h1,
.agg-modal-body h2,
.agg-modal-body h3,
.agg-modal-body h4,
.agg-modal-body h5,
.agg-modal-body h6 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.agg-modal-body p {
    margin-bottom: 15px;
}

.agg-modal-body ul,
.agg-modal-body ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.agg-modal-body li {
    margin-bottom: 5px;
}

/* Stili per immagini e media */
.agg-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 15px 0;
}

.agg-modal-body .wp-caption {
    max-width: 100%;
    margin: 15px 0;
    text-align: center;
}

.agg-modal-body .wp-caption img {
    margin: 0;
}

.agg-modal-body .wp-caption-text {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 3px;
}

.agg-modal-body blockquote {
    border-left: 4px solid #0073aa;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

.agg-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.agg-modal-body table th,
.agg-modal-body table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.agg-modal-body table th {
    background: #f8f9fa;
    font-weight: bold;
}

.agg-modal-body pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    margin: 15px 0;
}

.agg-modal-body code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.agg-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
    background: #f8f9fa;
}

/* Nessuna notizia */
.agg-no-news {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.agg-no-news h3 {
    color: #333;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    #agg-notizie-auth-container {
        margin: 10px;
        padding: 10px;
    }
    
    .agg-form-container {
        padding: 20px;
    }
    
    .agg-news-stats {
        flex-direction: column;
        text-align: center;
    }
    
    .agg-news-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .agg-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .agg-modal-header {
        padding: 10px 15px;
    }
    
    .agg-modal-body {
        padding: 15px;
    }
}

/* Layout login prioritario */
#agg-notizie-auth-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.agg-auth-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 30px;
    align-items: stretch;
}

.agg-auth-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    padding: 35px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e4e6eb;
}

.agg-login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,115,170,0.1), rgba(0,115,170,0));
    pointer-events: none;
}

.agg-auth-header {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 25px;
}

.agg-auth-icon {
    font-size: 42px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #0073aa;
    color: #ffffff;
}

.agg-auth-header h3 {
    margin: 0;
    font-size: 26px;
    color: #12263f;
}

.agg-auth-header p {
    margin: 4px 0 0;
    color: #637381;
}

.agg-auth-form {
    margin-top: 10px;
}

.agg-btn-full {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    padding: 14px 24px;
}

.agg-form-actions {
    margin-top: 25px;
}

.agg-helper-text {
    margin-top: 14px;
    font-size: 12px;
    color: #8694a8;
    text-align: center;
}

.agg-info-card {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #ffffff;
    padding: 40px 35px;
}

.agg-info-card h3 {
    color: #ffffff;
    font-size: 24px;
    margin-top: 0;
}

.agg-info-card p {
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 20px;
}

.agg-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.agg-info-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 15px;
}

.agg-info-list .dashicons {
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agg-btn-secondary.agg-btn-full {
    background: #ffffff;
    color: #1e3a8a;
    border: none;
    font-weight: 600;
}

.agg-btn-secondary.agg-btn-full:hover {
    background: rgba(255,255,255,0.9);
    color: #0f172a;
}

.agg-secondary-text {
    margin-top: 18px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
}

/* Contenitore messaggi */
#agg-messages {
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 960px) {
    .agg-auth-wrapper {
        grid-template-columns: 1fr;
    }
    
    .agg-info-card {
        order: -1;
    }
}

@media (max-width: 600px) {
    .agg-auth-card {
        padding: 28px 24px;
    }
    
    .agg-auth-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .agg-auth-icon {
        font-size: 32px;
        width: 56px;
        height: 56px;
    }
}

/* Animazioni */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.agg-form-container {
    animation: fadeIn 0.3s ease-in;
}

.agg-news-item {
    animation: fadeIn 0.3s ease-in;
}

/* Scrollbar personalizzata */
.agg-news-list::-webkit-scrollbar,
.agg-modal-body::-webkit-scrollbar {
    width: 8px;
}

.agg-news-list::-webkit-scrollbar-track,
.agg-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.agg-news-list::-webkit-scrollbar-thumb,
.agg-modal-body::-webkit-scrollbar-thumb {
    background: #0073aa;
    border-radius: 4px;
}

.agg-news-list::-webkit-scrollbar-thumb:hover,
.agg-modal-body::-webkit-scrollbar-thumb:hover {
    background: #005a87;
}
