/**
 * AIF Frontend styles - Activity Selection Shortcode
 * Pulito, moderno, accessibile, responsive.
 */

.aif-as-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2c3e50;
}

/* ==== HEADER ==== */
.aif-as-header {
    background: linear-gradient(135deg, #1a2a4a 0%, #2d5a8e 100%);
    color: #fff;
    padding: 28px 32px;
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: none;
    position: relative;
}
.aif-as-header h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.7em;
    font-weight: 700;
}
.aif-as-subtitle {
    margin: 0;
    opacity: 0.88;
    font-size: 0.96em;
}
.aif-as-badge-completed,
.aif-as-badge-incomplete {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 600;
}
.aif-as-badge-completed { background: rgba(40, 167, 69, 0.25); color: #fff; }
.aif-as-badge-incomplete { background: rgba(255, 193, 7, 0.3); color: #fff; }

/* ==== FEEDBACK ==== */
.aif-as-feedback {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-weight: 600;
    border-left: 4px solid;
}
.aif-as-feedback.success { background: #d1e7dd; color: #0f5132; border-color: #198754; }
.aif-as-feedback.error   { background: #f8d7da; color: #842029; border-color: #dc3545; }
.aif-as-feedback.info    { background: #cff4fc; color: #055160; border-color: #0dcaf0; }

/* ==== CARD ==== */
.aif-as-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 26px 28px;
    margin-bottom: 20px;
    box-shadow: none;
}
.aif-as-card-title {
    margin: 0 0 18px;
    font-size: 1.15em;
    color: #1a2a4a;
    border-bottom: 2px solid #eef0f4;
    padding-bottom: 12px;
}

/* ==== DAY BLOCK ==== */
.aif-as-day-block {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 14px;
    border: 1px solid #e3e9f1;
}
.aif-as-day-block h4 {
    margin: 0 0 14px;
    color: #2d5a8e;
    font-size: 1em;
}

/* ==== RADIO CHOICES (Workshop vs Meeting) ==== */
.aif-as-choice-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.aif-as-choice {
    background: #fff;
    border: 2px solid #d6deeb;
    border-radius: 10px;
    padding: 16px 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.18s ease;
    position: relative;
    overflow: hidden;
}
.aif-as-choice:hover {
    border-color: #2d5a8e;
    background: #f0f6ff;
    transform: translateY(-1px);
}
.aif-as-choice.active {
    border-color: #2d5a8e;
    background: linear-gradient(135deg, #e7f0ff 0%, #d6e8ff 100%);
    box-shadow: none;
}
.aif-as-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.aif-as-choice-icon {
    display: block;
    font-size: 2em;
    line-height: 1;
    margin-bottom: 6px;
}
.aif-as-choice-label {
    font-weight: 600;
    font-size: 0.95em;
    color: #2c3e50;
}
.aif-as-choice.active .aif-as-choice-label {
    color: #2d5a8e;
}

/* ==== SUB BLOCKS (workshop select / companies list) ==== */
.aif-as-sub-block {
    background: #fff;
    border: 1px solid #d6deeb;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 12px;
}
.aif-as-sub-block label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.93em;
}
.aif-as-sub-block label small {
    font-weight: 400;
    color: #6a7589;
    font-size: 0.85em;
}
.aif-as-workshop-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c4cfdf;
    border-radius: 6px;
    background: #fff;
    font-size: 0.95em;
}
.aif-as-workshop-info {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f7f9fc;
    border-radius: 6px;
    font-size: 0.85em;
    color: #4a5563;
    line-height: 1.5;
    border-left: 3px solid #2d5a8e;
}
.aif-as-workshop-info:empty {
    display: none;
}

/* ==== COMPANIES / STUDIOS LIST (multi-select with checkboxes) ==== */
.aif-as-companies-list,
.aif-as-studios-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 12px;
    background: #f7f9fc;
    border: 1px solid #e3e9f1;
    border-radius: 6px;
}
.aif-as-item {
    background: #fff;
    border: 1px solid #d6deeb;
    border-radius: 6px;
    padding: 8px 8px 8px 12px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}
.aif-as-item:hover {
    border-color: #2d5a8e;
    background: #f0f6ff;
}
.aif-as-item.checked {
    border-color: #198754;
    background: #d1e7dd;
}
.aif-as-item-check {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 0;
}
.aif-as-item-check input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}
.aif-as-item-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
    min-width: 0;
    word-wrap: break-word;
}
.aif-as-item-meta {
    color: #6a7589;
    font-size: 0.85em;
    font-weight: 400;
}
.aif-as-item-profile {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2f7;
    color: #2d5a8e;
    padding: 4px 9px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.78em;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.aif-as-item-profile:hover {
    background: #2d5a8e;
    color: #fff;
    text-decoration: none;
    transform: scale(1.04);
}
.aif-as-item-profile-icon {
    font-size: 1em;
    line-height: 1;
}
.aif-as-item-profile-text {
    font-size: 0.95em;
}
@media (max-width: 480px) {
    .aif-as-item-profile-text { display: none; }
    .aif-as-item-profile { padding: 4px 7px; }
}

/* ==== SOCIAL EVENTS TABLE ==== */
.aif-as-social-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.aif-as-social-table th,
.aif-as-social-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef0f4;
    text-align: center;
}
.aif-as-social-table th {
    background: #f7f9fc;
    color: #4a5563;
    font-weight: 600;
    font-size: 0.9em;
}
.aif-as-social-table td:first-child {
    text-align: left;
}

/* ==== TOGGLE SWITCH ==== */
.aif-as-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
}
.aif-as-toggle input { display: none; }
.aif-as-toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: background 0.2s ease;
}
.aif-as-toggle-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.aif-as-toggle input:checked + .aif-as-toggle-slider {
    background: #198754;
}
.aif-as-toggle input:checked + .aif-as-toggle-slider::before {
    transform: translateX(24px);
}

/* ==== SAVE BUTTON ==== */
.aif-as-save-row {
    text-align: center;
    margin: 30px 0 20px;
}
.aif-as-btn {
    background: #2d5a8e;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}
.aif-as-btn:hover {
    background: #1a2a4a;
    transform: translateY(-1px);
    box-shadow: none;
}
.aif-as-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.aif-as-btn-primary {
    background: linear-gradient(135deg, #198754 0%, #157048 100%);
    box-shadow: none;
}
.aif-as-btn-primary:hover {
    background: linear-gradient(135deg, #157048 0%, #105a3a 100%);
    box-shadow: none;
}
.aif-as-save-hint {
    color: #6a7589;
    margin-top: 10px;
    font-size: 0.85em;
}

/* ==== INFO / NOTICE ==== */
.aif-as-info {
    background: #fff7e6;
    border: 1px solid #ffe0a3;
    border-left: 4px solid #f39c12;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    color: #6a4f17;
    font-size: 0.92em;
}
.aif-as-notice {
    padding: 18px 22px;
    border-radius: 10px;
    text-align: center;
    font-size: 1em;
    margin: 30px auto;
    max-width: 600px;
}
.aif-as-notice-warning {
    background: #fff7e6;
    border: 2px solid #f39c12;
    color: #6a4f17;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 720px) {
    .aif-as-choice-group {
        grid-template-columns: 1fr;
    }
    .aif-as-companies-list,
    .aif-as-studios-list {
        grid-template-columns: 1fr;
    }
    .aif-as-header {
        padding: 20px;
    }
    .aif-as-header h2 {
        font-size: 1.35em;
    }
    .aif-as-card {
        padding: 18px;
    }
    .aif-as-social-table {
        font-size: 0.85em;
    }
    .aif-as-social-table th,
    .aif-as-social-table td {
        padding: 8px;
    }
}

/* ======================================================================== */
/* USER SCHEDULE (Blocco 7) — Scaletta personale frontend                    */
/* CSS scoped + reset aggressivo per evitare conflitti col tema             */
/* ======================================================================== */

.aif-schedule-wrap,
.aif-schedule-wrap * {
    box-sizing: border-box;
}

.aif-schedule-wrap {
    max-width: 900px;
    margin: 24px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: #1a2a4a;
    font-size: 15px;
    line-height: 1.5;
}

/* Reset elementi del tema dentro la wrap */
.aif-schedule-wrap h1,
.aif-schedule-wrap h2,
.aif-schedule-wrap h3,
.aif-schedule-wrap h4,
.aif-schedule-wrap p,
.aif-schedule-wrap ul,
.aif-schedule-wrap ol,
.aif-schedule-wrap li,
.aif-schedule-wrap small,
.aif-schedule-wrap details,
.aif-schedule-wrap summary,
.aif-schedule-wrap button,
.aif-schedule-wrap nav,
.aif-schedule-wrap article,
.aif-schedule-wrap section,
.aif-schedule-wrap header {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: normal;
    font-style: normal;
    text-transform: none;
    text-decoration: none;
    line-height: 1.5;
    list-style: none;
}

.aif-schedule-wrap h1 { font-size: 1.75em; font-weight: 700; line-height: 1.2; }
.aif-schedule-wrap h2 { font-size: 1.4em;  font-weight: 700; line-height: 1.3; }
.aif-schedule-wrap h3 { font-size: 1.1em;  font-weight: 700; line-height: 1.3; }
.aif-schedule-wrap h4 { font-size: 1em;    font-weight: 700; line-height: 1.3; }
.aif-schedule-wrap p  { margin-bottom: 0.4em; }

/* Admin preview banner */
.aif-schedule-wrap .aif-schedule-admin-banner {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-left: 4px solid #f39c12;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.92em;
    color: #856404;
}
.aif-schedule-wrap .aif-schedule-admin-banner a {
    margin-left: 12px;
    color: #2d5a8e;
    font-weight: 600;
    text-decoration: underline;
}

/* Header card */
.aif-schedule-wrap .aif-schedule-header {
    background: linear-gradient(135deg, #2d5a8e 0%, #1c4373 100%);
    color: #fff;
    padding: 28px 26px;
    border-radius: 14px;
    margin-bottom: 28px;
    box-shadow: none;
}
.aif-schedule-wrap .aif-schedule-org-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.aif-schedule-wrap .aif-schedule-logo {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: #fff;
    padding: 6px;
    object-fit: contain;
    flex-shrink: 0;
    border: 0;
    max-width: 72px;
    max-height: 72px;
}
.aif-schedule-wrap .aif-schedule-title {
    font-size: 1.7em;
    margin: 0 0 5px;
    color: #fff;
    line-height: 1.15;
    font-weight: 700;
}
.aif-schedule-wrap .aif-schedule-subtitle {
    margin: 0;
    color: rgba(255,255,255,0.88);
    font-size: 0.96em;
}

/* Rep tabs */
.aif-schedule-wrap .aif-schedule-rep-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 26px;
    border-bottom: 2px solid #e3e9f1;
    flex-wrap: wrap;
}
.aif-schedule-wrap .aif-schedule-rep-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 22px;
    cursor: pointer;
    font-size: 0.96em;
    color: #6a7589;
    transition: all 0.18s;
    margin-bottom: -2px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-family: inherit;
}
.aif-schedule-wrap .aif-schedule-rep-tab:hover {
    color: #2d5a8e;
    background: #f7f9fc;
}
.aif-schedule-wrap .aif-schedule-rep-tab.active {
    color: #2d5a8e;
    border-bottom-color: #2d5a8e;
    font-weight: 600;
}
.aif-schedule-wrap .aif-schedule-rep-tab strong {
    font-size: 0.92em;
    font-weight: 700;
}
.aif-schedule-wrap .aif-schedule-rep-name {
    font-size: 0.84em;
    color: inherit;
    font-weight: 400;
    opacity: 0.85;
}

/* Day section */
.aif-schedule-wrap .aif-schedule-day {
    margin-bottom: 36px;
}
.aif-schedule-wrap .aif-schedule-day-title {
    color: #1a2a4a;
    font-size: 1.35em;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef0f5;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 700;
}
.aif-schedule-wrap .aif-schedule-day-date {
    color: #6a7589;
    font-size: 0.66em;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Timeline */
.aif-schedule-wrap .aif-schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Generic block */
.aif-schedule-wrap .aif-schedule-block {
    display: flex;
    background: #fff;
    border: 1px solid #e3e9f1;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.aif-schedule-wrap .aif-schedule-block:hover {
    border-color: #c5d1e3;
    box-shadow: none;
}
.aif-schedule-wrap .aif-schedule-block-time {
    flex-shrink: 0;
    background: #f7f9fc;
    padding: 16px 14px;
    border-right: 1px solid #e3e9f1;
    width: 130px;
    font-weight: 700;
    color: #2d5a8e;
    font-size: 0.92em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
}
.aif-schedule-wrap .aif-schedule-block-body {
    flex: 1;
    padding: 14px 18px;
    min-width: 0;
}
.aif-schedule-wrap .aif-schedule-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05em;
    margin-bottom: 6px;
    color: #1a2a4a;
    font-weight: 700;
}
.aif-schedule-wrap .aif-schedule-block-icon {
    font-size: 1.25em;
    line-height: 1;
}
.aif-schedule-wrap .aif-schedule-block-desc {
    color: #6a7589;
    font-size: 0.9em;
    margin: 4px 0 6px;
}
.aif-schedule-wrap .aif-schedule-block-badge {
    display: inline-block;
    background: #eef4fc;
    color: #2d5a8e;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.76em;
    font-weight: 600;
    margin-top: 4px;
}

/* Block variants */
.aif-schedule-wrap .aif-schedule-block.type-plenary   .aif-schedule-block-time { background: #eef4fc; color: #1c4373; }
.aif-schedule-wrap .aif-schedule-block.type-aperitivo .aif-schedule-block-time { background: #fef7e0; color: #8a6d1f; }
.aif-schedule-wrap .aif-schedule-block.type-brunch    .aif-schedule-block-time { background: #fef7e0; color: #8a6d1f; }
.aif-schedule-wrap .aif-schedule-block.type-focus     .aif-schedule-block-time { background: #d1e7dd; color: #0f5132; }
.aif-schedule-wrap .aif-schedule-block.type-dinner    .aif-schedule-block-time { background: #5a3d8a; color: #fff; }
.aif-schedule-wrap .aif-schedule-block.type-dinner    { border-color: #c4b3dc; }

/* Focus content */
.aif-schedule-wrap .aif-schedule-focus-content { margin-top: 6px; }
.aif-schedule-wrap .aif-schedule-workshop-name {
    color: #1a2a4a;
    font-size: 1.05em;
    margin: 8px 0 4px;
    font-weight: 700;
}
.aif-schedule-wrap .aif-schedule-workshop-companies {
    color: #2d5a8e;
    font-size: 0.92em;
    margin: 2px 0 8px;
}
.aif-schedule-wrap .aif-schedule-workshop-abstract {
    color: #555;
    font-size: 0.9em;
    line-height: 1.55;
    margin: 8px 0 0;
    padding: 10px 14px;
    background: #f7f9fc;
    border-left: 3px solid #2d5a8e;
    border-radius: 4px;
}

/* Meeting list */
.aif-schedule-wrap .aif-schedule-meeting-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 0 !important;
}
.aif-schedule-wrap .aif-schedule-meeting-list li {
    display: flex;
    gap: 14px;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 6px;
    background: #f7f9fc;
    border-left: 3px solid #2d5a8e;
    align-items: flex-start;
    list-style: none !important;
}
.aif-schedule-wrap .aif-schedule-meeting-list li.parallel {
    border-left-color: #8e44ad;
    background: #f5eef9;
}
.aif-schedule-wrap .aif-schedule-meeting-time {
    flex-shrink: 0;
    width: 105px;
    font-weight: 700;
    color: #2d5a8e;
    font-size: 0.88em;
    padding-top: 1px;
}
.aif-schedule-wrap .aif-schedule-meeting-target {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.45;
}
.aif-schedule-wrap .aif-schedule-meeting-target strong {
    font-weight: 700;
    color: #1a2a4a;
}
.aif-schedule-wrap .aif-schedule-meeting-target small {
    color: #6a7589;
    font-weight: 400;
    margin-left: 6px;
    font-size: 0.86em;
}
.aif-schedule-wrap .aif-schedule-parallel-badge {
    display: inline-block;
    background: #8e44ad;
    color: #fff !important;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 0.74em;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Dinner content */
.aif-schedule-wrap .aif-schedule-dinner-content { margin-top: 6px; }
.aif-schedule-wrap .aif-schedule-dinner-table {
    padding: 14px 16px;
    background: #f5eef9;
    border-left: 3px solid #5a3d8a;
    border-radius: 6px;
}
.aif-schedule-wrap .aif-schedule-dinner-number {
    display: inline-block;
    background: #5a3d8a;
    color: #fff !important;
    padding: 5px 16px;
    border-radius: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.92em;
    letter-spacing: 0.3px;
}
.aif-schedule-wrap .aif-schedule-dinner-count {
    color: #6a7589;
    font-size: 0.9em;
    margin: 4px 0;
}
.aif-schedule-wrap .aif-schedule-dinner-table details {
    margin-top: 12px;
    font-size: 0.92em;
}
.aif-schedule-wrap .aif-schedule-dinner-table summary {
    cursor: pointer;
    color: #5a3d8a;
    font-weight: 600;
    user-select: none;
    padding: 4px 0;
}
.aif-schedule-wrap .aif-schedule-dinner-table summary:hover { color: #3d2961; }
.aif-schedule-wrap .aif-schedule-dinner-participants {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 0 !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
}
.aif-schedule-wrap .aif-schedule-dinner-participants li {
    padding: 7px 11px;
    background: #fff;
    border-radius: 4px;
    font-size: 0.9em;
    list-style: none !important;
}
.aif-schedule-wrap .aif-schedule-dinner-participants small {
    color: #6a7589;
    margin-left: 6px;
    font-size: 0.86em;
}

/* Error / login messages */
.aif-schedule-wrap .aif-schedule-message {
    background: #fff;
    border: 1px solid #e3e9f1;
    border-radius: 12px;
    padding: 44px 32px;
    text-align: center;
}
.aif-schedule-wrap .aif-schedule-message h2 {
    color: #1a2a4a;
    margin: 0 0 12px;
}
.aif-schedule-wrap .aif-schedule-message p {
    color: #555;
}
.aif-schedule-wrap .aif-schedule-message .button {
    margin-top: 8px;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .aif-schedule-wrap .aif-schedule-block { flex-direction: column; }
    .aif-schedule-wrap .aif-schedule-block-time {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e3e9f1;
        padding: 10px 14px;
        justify-content: flex-start;
    }
    .aif-schedule-wrap .aif-schedule-meeting-list li {
        flex-direction: column;
        gap: 4px;
    }
    .aif-schedule-wrap .aif-schedule-meeting-time { width: auto; }
    .aif-schedule-wrap .aif-schedule-org-info { flex-direction: column; align-items: flex-start; }
    .aif-schedule-wrap .aif-schedule-title { font-size: 1.4em; }
}

/* Logo PDF / placeholder */
.aif-schedule-wrap .aif-schedule-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-weight: 700;
    font-size: 1.5em;
    letter-spacing: 1px;
    border: 2px solid rgba(255,255,255,0.3);
}
.aif-schedule-wrap a.aif-schedule-logo-pdf,
.aif-schedule-wrap .aif-schedule-logo-pdf {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #2d5a8e;
    text-decoration: none;
    gap: 2px;
    padding: 8px 4px;
}
.aif-schedule-wrap .aif-schedule-logo-pdf-icon {
    font-size: 1.8em;
    line-height: 1;
}
.aif-schedule-wrap .aif-schedule-logo-pdf-text {
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.aif-schedule-wrap a.aif-schedule-logo-pdf:hover {
    background: #eef4fc;
}

/* Badge differenziate per tipo */
.aif-schedule-wrap .aif-schedule-block-badge.type-plenary   { background: #eef4fc; color: #2d5a8e; }
.aif-schedule-wrap .aif-schedule-block-badge.type-aperitivo { background: #fef7e0; color: #8a6d1f; }
.aif-schedule-wrap .aif-schedule-block-badge.type-brunch    { background: #fef7e0; color: #8a6d1f; }
.aif-schedule-wrap .aif-schedule-block-badge.type-break     { background: #f0f0f5; color: #555; }

/* Tipo "generico" — nessuna badge, colore neutro */
.aif-schedule-wrap .aif-schedule-block.type-generic .aif-schedule-block-time {
    background: #f0f2f5;
    color: #555;
}

/* Action bar nella user-schedule */
.aif-schedule-wrap .aif-schedule-org-text {
    flex: 1;
    min-width: 0;
}
.aif-schedule-wrap .aif-schedule-actions {
    flex-shrink: 0;
}
.aif-schedule-wrap a.aif-schedule-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    border: 1.5px solid rgba(255,255,255,0.35);
    padding: 10px 18px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.92em;
    text-decoration: none !important;
    transition: all 0.15s;
}
.aif-schedule-wrap a.aif-schedule-download-btn:hover {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.7);
}

@media (max-width: 600px) {
    .aif-schedule-wrap .aif-schedule-actions { width: 100%; }
    .aif-schedule-wrap a.aif-schedule-download-btn { width: 100%; justify-content: center; }
}

/* Container per multi bottoni PDF */
.aif-schedule-wrap .aif-schedule-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ======================================================================== */
/* SEZIONE COLLABORAZIONI (activity selection - studio)                      */
/* ======================================================================== */
.aif-as-card-collab {
    background: #fffbf0;
    border-left: 4px solid #f39c12;
}
.aif-as-collab-intro {
    color: #555;
    line-height: 1.5;
    margin: 0 0 8px;
}
.aif-as-collab-required {
    color: #8a5a00;
    font-size: 0.9em;
    margin: 6px 0 14px;
}
.aif-as-collab-search-wrap {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.aif-as-collab-search {
    flex: 1;
    min-width: 220px;
    padding: 8px 12px;
    border: 2px solid #e3e9f1;
    border-radius: 6px;
    font-size: 0.95em;
}
.aif-as-collab-search:focus {
    outline: none;
    border-color: #2d5a8e;
}
.aif-as-collab-count-msg {
    color: #6a7589;
    font-size: 0.9em;
}
.aif-as-collab-count-msg .aif-as-collab-answered {
    font-weight: 700;
    color: #2d5a8e;
}
.aif-as-collab-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e3e9f1;
    border-radius: 6px;
    background: #fff;
    padding: 4px;
}
.aif-as-collab-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-bottom: 1px solid #eef0f5;
    transition: background 0.15s;
}
.aif-as-collab-row:last-child { border-bottom: none; }
.aif-as-collab-row:hover { background: #f7f9fc; }
.aif-as-collab-row-info {
    flex: 1;
    min-width: 0;
}
.aif-as-collab-row-info strong {
    color: #1a2a4a;
}
.aif-as-collab-row-info small {
    color: #6a7589;
    margin-left: 4px;
}
.aif-as-collab-row-radios {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.aif-as-collab-radio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 2px solid #e3e9f1;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    font-size: 0.92em;
    transition: all 0.15s;
    user-select: none;
}
.aif-as-collab-radio:hover { border-color: #a0b0c8; }
.aif-as-collab-radio input[type="radio"] {
    margin: 0;
    accent-color: #2d5a8e;
}
.aif-as-collab-radio input[type="radio"]:checked + .aif-as-collab-radio-label {
    font-weight: 700;
}
.aif-as-collab-radio:has(input:checked) {
    background: #eef4fc;
    border-color: #2d5a8e;
}
.aif-as-collab-radio-yes:has(input:checked) {
    background: #fff3cd;
    border-color: #f39c12;
}

.aif-as-collab-row-yes {
    background: #fff7dc;
}
.aif-as-collab-row-yes:hover { background: #fff0c4; }
.aif-as-collab-row-missing {
    background: #fff5f5 !important;
    border-left: 3px solid #dc3232;
    padding-left: 9px;
}
.aif-as-collab-row-missing:hover { background: #ffeded !important; }

.aif-as-collab-shortcut {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Badge collaborazione forzata in agenda utente */
.aif-schedule-wrap .aif-schedule-collab-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 6px;
}

/* ======================================================================== */
/* PREVIEW SESSION (v2.2.0)                                                  */
/* ======================================================================== */
.aif-schedule-block-preview {
    background: #f5eef8;
    border-left: 4px solid #8e44ad;
}
.aif-schedule-block-preview .aif-schedule-block-title {
    color: #6c3483;
}

/* Nel form activity selection, marca visivamente la scelta preview */
.aif-as-choice input[value="preview"]:checked ~ .aif-as-choice-label {
    color: #8e44ad;
}

/* ======================================================================== */
/* v2.3.5 — UI adjustments                                                    */
/* ======================================================================== */

/* Subtitle bianca (activity selection + user schedule header) */
.aif-as-subtitle-white,
.aif-schedule-subtitle-white {
    color: #ffffff !important;
    opacity: 0.95;
}
.aif-as-subtitle-white strong,
.aif-schedule-subtitle-white strong {
    color: #ffffff !important;
}

/* Choice group in 3 colonne */
.aif-as-choice-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: stretch;
}
.aif-as-choice-group .aif-as-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 8px;
    min-height: 90px;
}
.aif-as-choice-group .aif-as-choice-icon {
    font-size: 1.6em;
    margin-bottom: 4px;
}
.aif-as-choice-group .aif-as-choice-label {
    font-size: 0.92em;
    font-weight: 600;
    line-height: 1.2;
}
/* Su mobile stretto ricrolla a colonna singola */
@media (max-width: 480px) {
    .aif-as-choice-group {
        grid-template-columns: 1fr;
    }
    .aif-as-choice-group .aif-as-choice {
        min-height: auto;
        flex-direction: row;
        gap: 10px;
    }
    .aif-as-choice-group .aif-as-choice-icon {
        margin-bottom: 0;
    }
}

/* Banner salva (in cima al form) */
.aif-as-save-banner {
    background: linear-gradient(135deg, #fff9db 0%, #ffefaa 100%);
    border: 1px solid #f39c12;
    border-left: 5px solid #f39c12;
    color: #6c4a00;
    padding: 14px 18px;
    border-radius: 8px;
    margin: 16px 0 20px;
    font-size: 0.95em;
    line-height: 1.5;
}
.aif-as-save-banner strong {
    color: #4a3200;
}
.aif-as-save-banner em {
    background: #f39c12;
    color: #fff;
    padding: 1px 8px;
    border-radius: 4px;
    font-style: normal;
    font-weight: 600;
    font-size: 0.9em;
}

/* Pulsante "Visita il sito" sotto la bio del profilo */
.aif-profile-website-btn-wrap {
    text-align: center;
    margin-top: 20px;
}
.aif-profile-website-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #2d5a8e 0%, #1a4173 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1em;
    box-shadow: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.aif-profile-website-btn:hover,
.aif-profile-website-btn:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: none;
}

/* v2.3.6 — PDF.js logo renderer (mirror da profile.css) */
.aif-profile-logo-pdfjs {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    background: #f7f9fc;
    border: 1px solid #e3e9f1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.aif-profile-logo-pdfjs-loading {
    font-size: 2.4em;
    font-weight: 700;
    color: #b0bccf;
    letter-spacing: 2px;
    animation: aif-pdfjs-pulse 1.4s ease-in-out infinite;
}
@keyframes aif-pdfjs-pulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1;    }
}
.aif-profile-logo-pdfjs-canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    background: #fff;
}
.aif-profile-logo-pdfjs.is-rendered { background: #fff; }
.aif-profile-logo-pdfjs.is-fallback { background: #f0f2f7; }
