/* ==========================================================================
   AVGP Member Portal — Frontend Styles
   Primary: #2c6e3f | Max width: 960px
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.avgp-dashboard,
.avgp-evaluations-summary {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.avgp-section {
    margin-bottom: 32px;
}

.avgp-form-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 0;
}

/* --------------------------------------------------------------------------
   Headings
   -------------------------------------------------------------------------- */

.avgp-dashboard h2,
.avgp-evaluations-summary h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #1a1a1a;
    border-bottom: 2px solid #2c6e3f;
    padding-bottom: 8px;
}

.avgp-dashboard h3,
.avgp-form-wrapper h3 {
    font-size: 1.2rem;
    margin: 24px 0 12px;
    color: #2c6e3f;
}

.avgp-dashboard h4,
.avgp-form-wrapper h4 {
    font-size: 1rem;
    margin: 20px 0 8px;
    color: #333;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.avgp-btn {
    display: inline-block;
    padding: 10px 18px;
    background-color: #2c6e3f;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    line-height: 1.4;
}

.avgp-btn:hover,
.avgp-btn:focus {
    background-color: #245a33;
    color: #fff;
    text-decoration: none;
}

.avgp-btn--secondary {
    background-color: #6c757d;
    margin-left: 8px;
}

.avgp-btn--secondary:hover,
.avgp-btn--secondary:focus {
    background-color: #5a6268;
    color: #fff;
}

.avgp-btn--danger {
    background-color: #c0392b;
}

.avgp-btn--danger:hover,
.avgp-btn--danger:focus {
    background-color: #a93226;
    color: #fff;
}

.avgp-btn--small {
    padding: 5px 10px;
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.avgp-form {
    max-width: 640px;
}

.avgp-form-row {
    margin-bottom: 18px;
}

.avgp-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.avgp-form-row input[type="text"],
.avgp-form-row input[type="email"],
.avgp-form-row input[type="tel"],
.avgp-form-row input[type="date"],
.avgp-form-row input[type="number"],
.avgp-form-row input[type="password"],
.avgp-form-row input[type="file"],
.avgp-form-row select,
.avgp-form-row textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.avgp-form-row input[type="file"] {
    padding: 6px 8px;
}

.avgp-form-row input:focus,
.avgp-form-row select:focus,
.avgp-form-row textarea:focus {
    outline: none;
    border-color: #2c6e3f;
    box-shadow: 0 0 0 2px rgba(44, 110, 63, 0.15);
}

.avgp-form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.avgp-form-row .required {
    color: #c0392b;
    margin-left: 2px;
}

.avgp-form-row--score {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.avgp-form-row--score label {
    flex: 1;
    margin-bottom: 0;
    font-weight: normal;
}

.avgp-form-row--score select {
    width: auto;
    min-width: 80px;
    flex-shrink: 0;
}

/* Checkbox / radio rows */
.avgp-form-row input[type="checkbox"],
.avgp-form-row input[type="radio"] {
    width: auto;
    margin-right: 6px;
    vertical-align: middle;
}

.avgp-form-row label:has(input[type="checkbox"]),
.avgp-form-row label:has(input[type="radio"]) {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --------------------------------------------------------------------------
   Year filter
   -------------------------------------------------------------------------- */

.avgp-year-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.avgp-year-filter label {
    font-weight: 600;
    font-size: 14px;
}

.avgp-year-filter select {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.avgp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 24px;
    background-color: #fff;
}

.avgp-table th,
.avgp-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.avgp-table th {
    background-color: #f5f5f5;
    font-weight: 700;
    color: #444;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.avgp-table tbody tr:hover {
    background-color: #f9fdf9;
}

.avgp-table--evaluations {
    font-size: 13px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.avgp-table--evaluations th,
.avgp-table--evaluations td {
    padding: 8px 10px;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */

.avgp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: capitalize;
    white-space: nowrap;
}

.avgp-badge--success,
.avgp-badge--pass,
.avgp-badge--active {
    background-color: #d4edda;
    color: #155724;
}

.avgp-badge--error,
.avgp-badge--fail,
.avgp-badge--denied {
    background-color: #f8d7da;
    color: #721c24;
}

.avgp-badge--warning,
.avgp-badge--submitted,
.avgp-badge--under-review,
.avgp-badge--pending {
    background-color: #fff3cd;
    color: #856404;
}

.avgp-badge--neutral,
.avgp-badge--inactive {
    background-color: #e2e3e5;
    color: #383d41;
}

/* --------------------------------------------------------------------------
   Dog cards
   -------------------------------------------------------------------------- */

.avgp-dog-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.avgp-dog-card h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #2c6e3f;
}

.avgp-dog-card p {
    margin: 4px 0;
    font-size: 14px;
    color: #555;
}

.avgp-dog-card img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   Secondary handler (SH) cards
   -------------------------------------------------------------------------- */

.avgp-sh-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 12px;
    font-size: 14px;
}

.avgp-sh-card p {
    margin: 3px 0;
    color: #555;
}

/* --------------------------------------------------------------------------
   Summary cards
   -------------------------------------------------------------------------- */

.avgp-summary-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.avgp-summary-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px 24px;
    min-width: 140px;
    flex: 1;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.avgp-summary-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2c6e3f;
    line-height: 1.1;
    margin-bottom: 6px;
}

.avgp-summary-card span {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Notices
   -------------------------------------------------------------------------- */

.avgp-notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

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

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

.avgp-notice--warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* --------------------------------------------------------------------------
   Private notes
   -------------------------------------------------------------------------- */

.avgp-private-note {
    background-color: #fff8e1;
    border-left: 3px solid #ffc107;
    padding: 10px 14px;
    font-size: 13px;
    color: #555;
    margin-top: 6px;
    border-radius: 0 4px 4px 0;
}

.avgp-private-note strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 3px;
}

/* --------------------------------------------------------------------------
   Scores table
   -------------------------------------------------------------------------- */

.avgp-scores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 12px 0 20px;
}

.avgp-scores-table th,
.avgp-scores-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.avgp-scores-table th {
    font-weight: 600;
    color: #555;
    width: 60%;
}

.avgp-scores-table td {
    font-weight: 700;
    color: #2c6e3f;
    text-align: right;
}

/* --------------------------------------------------------------------------
   Login required
   -------------------------------------------------------------------------- */

.avgp-login-required {
    text-align: center;
    padding: 48px 24px;
    color: #555;
}

.avgp-login-required p {
    font-size: 15px;
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Error / not found
   -------------------------------------------------------------------------- */

.avgp-error {
    padding: 16px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Profile summary
   -------------------------------------------------------------------------- */

.avgp-profile-summary {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.avgp-profile-summary p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.avgp-profile-summary strong {
    color: #333;
}

/* --------------------------------------------------------------------------
   Current photo / file display
   -------------------------------------------------------------------------- */

.avgp-current-photo {
    margin-bottom: 10px;
}

.avgp-current-photo img {
    display: block;
    max-width: 120px;
    max-height: 120px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    margin-bottom: 4px;
}

.avgp-current-file {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.avgp-current-file a {
    color: #2c6e3f;
    text-decoration: underline;
}

.avgp-upload-preview {
    display: block;
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    object-fit: cover;
    margin-top: 8px;
    border: 1px solid #e0e0e0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
    .avgp-summary-cards {
        flex-direction: column;
    }

    .avgp-form-row--score {
        flex-direction: column;
        align-items: flex-start;
    }

    .avgp-form-row--score select {
        width: 100%;
    }

    .avgp-table th,
    .avgp-table td {
        padding: 8px 8px;
        font-size: 13px;
    }

    .avgp-btn {
        padding: 9px 14px;
        font-size: 13px;
    }
}
