/* Online form styles — edit this file for the web form look */

/* Shared input style */
#pims-pgdm-form input[type="text"],
#pims-pgdm-form input[type="email"],
#pims-pgdm-form input[type="number"],
#pims-pgdm-form input[type="date"],
#pims-pgdm-form input[type="file"],
#pims-standalone-form input[type="text"],
#pims-standalone-form input[type="email"],
#pims-standalone-form input[type="number"],
#pims-standalone-form input[type="date"],
#pims-standalone-form input[type="file"] {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.9rem;
    background: #fff;
    outline: none;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    line-height: 1.4;
}

#pims-pgdm-form input:focus,
#pims-standalone-form input:focus {
    border-color: #1a3a6b;
    box-shadow: 0 0 0 2px rgba(26, 58, 107, 0.15);
}

#pims-pgdm-form input[type="number"],
#pims-standalone-form input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

#pims-pgdm-form input[type="number"]::-webkit-outer-spin-button,
#pims-pgdm-form input[type="number"]::-webkit-inner-spin-button,
#pims-standalone-form input[type="number"]::-webkit-outer-spin-button,
#pims-standalone-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#pims-pgdm-form input[type="date"],
#pims-standalone-form input[type="date"] {
    min-height: 38px;
}

/* --- WordPress form (#pims-pgdm-form) --- */
#pims-pgdm-form * { box-sizing: border-box; }
#pims-pgdm-form {
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto;
}

#pims-pgdm-form .pims-page {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    overflow: hidden;
}

#pims-pgdm-form .pims-header {
    background: #1a3a6b;
    color: #fff;
    padding: 20px 28px;
}

#pims-pgdm-form .pims-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

#pims-pgdm-form .pims-header-text h2 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: bold;
}

#pims-pgdm-form .pims-header-text p {
    font-size: 0.85rem;
    margin: 4px 0 0;
    opacity: 0.9;
}

#pims-pgdm-form .pims-form-title {
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 14px;
}

#pims-pgdm-form .pims-photo-box {
    width: 100px;
    height: 120px;
    border: 2px dashed rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

#pims-pgdm-form .pims-app-meta {
    display: flex;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

#pims-pgdm-form .pims-btn-dark {
    background: #525455;
}

#pims-pgdm-form .pims-app-meta .pims-field { flex: 1; min-width: 180px; }
#pims-pgdm-form .pims-field-narrow { max-width: 220px; }
#pims-pgdm-form .pims-field-age { max-width: 100px; }
#pims-pgdm-form .pims-field-score { max-width: 140px; }
#pims-pgdm-form .pims-field-pin { max-width: 180px; }
#pims-pgdm-form .pims-form-body { padding: 20px 28px 32px; }

#pims-pgdm-form .pims-section-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #1a3a6b;
    border-bottom: 2px solid #1a3a6b;
    padding-bottom: 6px;
    margin: 24px 0 14px;
}

#pims-pgdm-form .pims-section-title:first-child { margin-top: 0; }
#pims-pgdm-form .pims-field { margin-bottom: 14px; }

#pims-pgdm-form .pims-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

#pims-pgdm-form .pims-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

#pims-pgdm-form .pims-row .pims-field { flex: 1; min-width: 140px; }

#pims-pgdm-form .pims-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding: 4px 0;
}

#pims-pgdm-form .pims-radio-group label {
    font-size: 0.9rem;
    font-weight: normal;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

#pims-pgdm-form .pims-radio-group input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

#pims-pgdm-form .pims-dob-fields {
    display: flex;
    align-items: center;
    gap: 6px;
}

#pims-pgdm-form .pims-dob-fields input {
    width: 56px;
    text-align: center;
}

#pims-pgdm-form .pims-qual-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.85rem;
}

#pims-pgdm-form .pims-qual-table th {
    background: #f0f4f8;
    color: #1a3a6b;
    padding: 8px 10px;
    text-align: left;
    font-size: 0.8rem;
    border: 1px solid #ccc;
}

#pims-pgdm-form .pims-qual-table td {
    border: 1px solid #ccc;
    padding: 4px 6px;
}

#pims-pgdm-form .pims-qual-table td:first-child {
    font-weight: 600;
    background: #f9fafb;
    width: 140px;
}

#pims-pgdm-form .pims-qual-table input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
}

#pims-pgdm-form .pims-alert {
    padding: 12px 16px;
    margin: 20px 28px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

#pims-pgdm-form .pims-alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
#pims-pgdm-form .pims-alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
#pims-pgdm-form .pims-alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
#pims-pgdm-form .pims-alert ul { margin: 6px 0 0 18px; }

#pims-pgdm-form .pims-download-row {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#pims-pgdm-form .pims-download-row p {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 12px;
}

#pims-pgdm-form .pims-btn-download {
    display: inline-block;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    color: #2c5f4f;
    background: #fff;
    border: 2px solid #2c5f4f;
}

#pims-pgdm-form .pims-btn-download:hover { background: #2c5f4f; color: #fff; }

#pims-pgdm-form .pims-download-row .pims-btn-download {
    margin: 4px 6px;
}

#pims-pgdm-form .pims-btn-download-pro {
    color: #1a3a6b;
    border-color: #1a3a6b;
}

#pims-pgdm-form .pims-btn-download-pro:hover {
    background: #1a3a6b;
    color: #fff;
}

#pims-pgdm-form .pims-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

#pims-pgdm-form .pims-btn {
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: #fff;
}

#pims-pgdm-form .pims-btn-primary { background: #1a3a6b; }
#pims-pgdm-form .pims-btn-secondary { background: #4a8fd4; }

/* --- Standalone PHP form (#pims-standalone-form) --- */
#pims-standalone-form {
    max-width: 900px;
    margin: 24px auto;
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    line-height: 1.5;
}

#pims-standalone-form * { box-sizing: border-box; }

#pims-standalone-form .header {
    background: #1a3a6b;
    color: #fff;
    padding: 20px 28px;
}

#pims-standalone-form .header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

#pims-standalone-form .header-text h1 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0;
}

#pims-standalone-form .header-text p {
    font-size: 0.85rem;
    margin-top: 4px;
    opacity: 0.9;
}

#pims-standalone-form .form-title {
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 14px;
}

#pims-standalone-form .photo-box {
    width: 100px;
    height: 120px;
    border: 2px dashed rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

#pims-standalone-form .app-meta {
    display: flex;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

#pims-standalone-form .app-meta .field { flex: 1; min-width: 180px; }
#pims-standalone-form .form-body { padding: 20px 28px 32px; }

#pims-standalone-form .section-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #1a3a6b;
    border-bottom: 2px solid #1a3a6b;
    padding-bottom: 6px;
    margin: 24px 0 14px;
}

#pims-standalone-form .field { margin-bottom: 14px; }

#pims-standalone-form .field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

#pims-standalone-form .row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

#pims-standalone-form .row .field { flex: 1; min-width: 140px; }

#pims-standalone-form .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

#pims-standalone-form .radio-group label {
    font-size: 0.9rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

#pims-standalone-form .radio-group input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

#pims-standalone-form .dob-fields {
    display: flex;
    align-items: center;
    gap: 6px;
}

#pims-standalone-form .dob-fields input {
    width: 56px;
    text-align: center;
}

#pims-standalone-form table.qual-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

#pims-standalone-form table.qual-table th {
    background: #f0f4f8;
    color: #1a3a6b;
    padding: 8px 10px;
    font-size: 0.8rem;
    border: 1px solid #ccc;
}

#pims-standalone-form table.qual-table td {
    border: 1px solid #ccc;
    padding: 4px 6px;
}

#pims-standalone-form table.qual-table td:first-child {
    font-weight: 600;
    background: #f9fafb;
    width: 140px;
}

#pims-standalone-form table.qual-table input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
}

#pims-standalone-form .alert {
    padding: 12px 16px;
    margin: 20px 28px 0;
    border-radius: 6px;
    font-size: 0.9rem;
}

#pims-standalone-form .alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
#pims-standalone-form .alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
#pims-standalone-form .alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

#pims-standalone-form .download-row {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#pims-standalone-form .download-row p {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 12px;
}

#pims-standalone-form .btn-download {
    display: inline-block;
    padding: 12px 28px;
    cursor: pointer;
    font-weight: bold;
    color: #2c5f4f;
    background: #fff;
    border: 2px solid #2c5f4f;
    border-radius: 6px;
}

#pims-standalone-form .btn-download:hover { background: #2c5f4f; color: #fff; }

#pims-standalone-form .download-row .btn-download {
    margin: 4px 6px;
}

#pims-standalone-form .btn-download-pro {
    color: #1a3a6b;
    border-color: #1a3a6b;
}

#pims-standalone-form .btn-download-pro:hover {
    background: #1a3a6b;
    color: #fff;
}

#pims-standalone-form .buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

#pims-standalone-form .btn {
    padding: 12px 28px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: #fff;
}

#pims-standalone-form .btn-primary { background: #1a3a6b; }
#pims-standalone-form .btn-secondary { background: #4a8fd4; }

@media (max-width: 600px) {
    #pims-pgdm-form .pims-header-top,
    #pims-standalone-form .header-top { flex-direction: column; }
    #pims-pgdm-form .pims-photo-box,
    #pims-standalone-form .photo-box { align-self: flex-end; }
}
