/* =====================================================================
   Primofarma Galenico – Frontend CSS
   ===================================================================== */

/* ── Wrap ── */
.pg-public-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 20px;
    font-family: inherit;
}
.pg-section-title { margin-top: 0; }

/* ── Tabs (registrazione) ── */
.pg-tabs { display: flex; border-bottom: 2px solid #e2e2e2; margin-bottom: 24px; }
.pg-tab {
    background: none; border: none; padding: 10px 20px;
    font-size: 15px; cursor: pointer; color: #555;
    border-bottom: 3px solid transparent; margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.pg-tab--active, .pg-tab:hover { color: #0073aa; border-bottom-color: #0073aa; }

.pg-tab-panel { display: none; }
.pg-tab-panel--active { display: block; }

/* ── Buttons ── */
.pg-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: 4px; font-size: 15px;
    font-weight: 600; cursor: pointer; text-decoration: none;
    border: 2px solid transparent; transition: opacity .15s;
    line-height: 1.4;
}
.pg-btn:hover { opacity: .85; }
.pg-btn--primary  { background: #0073aa; color: #fff; border-color: #0073aa; }
.pg-btn--outline  { background: #fff; color: #0073aa; border-color: #0073aa; }
.pg-btn--full     { width: 100%; justify-content: center; }

/* ── Form rows ── */
.pg-form-row { margin-bottom: 18px; }
.pg-form-row label { display: block; font-weight: 600; margin-bottom: 6px; }
.pg-input, .pg-textarea {
    width: 100%; padding: 10px 14px; border: 1px solid #ccc;
    border-radius: 4px; font-size: 15px; box-sizing: border-box;
    transition: border-color .2s;
}
.pg-input:focus, .pg-textarea:focus { outline: none; border-color: #0073aa; }
.pg-textarea { resize: vertical; }
.pg-checkbox-label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; }

/* ── Radio group ── */
.pg-radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.pg-radio-label {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; border: 2px solid #ddd; border-radius: 6px;
    cursor: pointer; transition: border-color .2s;
}
.pg-radio-label:has(input:checked) { border-color: #0073aa; background: #f0f7ff; }

/* ── File drop ── */
.pg-file-drop {
    border: 2px dashed #ccc; border-radius: 6px;
    padding: 24px; text-align: center; position: relative;
    transition: border-color .2s, background .2s; cursor: pointer;
}
.pg-file-drop:hover, .pg-file-drop.pg-drag-over { border-color: #0073aa; background: #f0f7ff; }
.pg-file-input {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
    border: none; background: none;
}
.pg-file-drop__inner { pointer-events: none; }
.pg-file-drop__icon  { font-size: 32px; display: block; margin-bottom: 8px; }
.pg-file-drop__text  { display: block; font-weight: 600; }
.pg-file-drop__hint  { display: block; font-size: 12px; color: #888; margin-top: 4px; }
.pg-file-preview { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Feedback ── */
.pg-feedback {
    padding: 12px 16px; border-radius: 4px; font-size: 14px; margin-top: 12px;
}
.pg-feedback--success { background: #edfaee; color: #1a7722; border: 1px solid #46b450; }
.pg-feedback--error   { background: #fde8e8; color: #a10000; border: 1px solid #dc3232; }

.pg-notice { background: #fffbe5; border-left: 4px solid #f0b849; padding: 12px 16px; }

/* ── Already logged ── */
.pg-already-logged { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── Dashboard ricette ── */
.pg-loading { text-align: center; padding: 24px; color: #777; }
.pg-spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 3px solid #ccc; border-top-color: #0073aa;
    border-radius: 50%; animation: pg-spin .7s linear infinite;
    vertical-align: middle; margin-right: 6px;
}
@keyframes pg-spin { to { transform: rotate(360deg); } }

.pg-prescriptions-list { list-style: none; padding: 0; margin: 0; }
.pg-prescription-item {
    border: 1px solid #e2e2e2; border-radius: 6px; padding: 14px 18px;
    margin-bottom: 12px; display: flex; justify-content: space-between;
    align-items: flex-start; flex-wrap: wrap; gap: 8px;
}
.pg-prescription-item__info { flex: 1; min-width: 200px; }
.pg-prescription-item__date { font-size: 12px; color: #888; }

/* ── Badge ── */
.pg-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600; text-transform: uppercase;
}
.pg-badge--warning { background: #fff8e5; color: #946800; border: 1px solid #f0b849; }
.pg-badge--info    { background: #e5f4ff; color: #005fba; border: 1px solid #46b3e6; }
.pg-badge--primary { background: #f3f0f9; color: #4a3373; border: 1px solid #826eb4; }
.pg-badge--success { background: #edfaee; color: #1a7722; border: 1px solid #46b450; }
.pg-badge--danger  { background: #fde8e8; color: #a10000; border: 1px solid #dc3232; }
