/* ============================================================
   Designer Application Plugin – Frontend Styles v2
   Accent: #E10600  |  Text: #000  |  Background: #fff
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* ============================================================
   WRAPPER
   ============================================================ */
.dap-wrapper {
    max-width: 740px;
    margin: 40px auto;
    padding: 0 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #000;
    background: #fff;
}

/* ============================================================
   HEADER
   ============================================================ */
.dap-header {
    text-align: center;
    padding: 48px 32px 36px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 40px;
}
.dap-header__title {
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    margin: 0 0 12px;
    line-height: 1.2;
}
.dap-header__subtitle {
    font-size: 1.05rem;
    color: #444;
    margin: 0 0 26px;
    line-height: 1.6;
}
.dap-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}
.dap-benefits li {
    font-size: .97rem;
    color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dap-benefits__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #E10600;
    color: #fff;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================================
   FORM SECTIONS
   ============================================================ */
.dap-form { display: flex; flex-direction: column; }
.dap-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px 32px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.dap-section__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid #E10600;
}
.dap-section__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #E10600;
    color: #fff;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.dap-section__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #000;
    margin: 0;
}

/* ============================================================
   2-COLUMN ROW
   ============================================================ */
.dap-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 640px) {
    .dap-row { grid-template-columns: 1fr; }
}

/* ============================================================
   FIELDS
   ============================================================ */
.dap-field { margin-bottom: 22px; }
.dap-field:last-child { margin-bottom: 0; }
.dap-label {
    display: block;
    font-size: .93rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 7px;
}
.dap-required { color: #E10600; margin-left: 2px; }
.dap-optional { color: #888; font-weight: 400; font-size: .85em; margin-left: 4px; }
.dap-hint {
    display: block;
    font-size: .82rem;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

/* ============================================================
   INPUTS / SELECT / TEXTAREA
   ============================================================ */
.dap-input,
.dap-select,
.dap-textarea {
    width: 100%;
    padding: 11px 15px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    color: #111;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}
.dap-input:focus,
.dap-select:focus,
.dap-textarea:focus {
    outline: none;
    border-color: #E10600;
    box-shadow: 0 0 0 3px rgba(225,6,0,.12);
}
.dap-input::placeholder,
.dap-textarea::placeholder { color: #aaa; }

/* Select arrow */
.dap-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}
.dap-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.55;
}

/* Character count */
.dap-charcount {
    text-align: right;
    font-size: .8rem;
    color: #888;
    margin-top: 4px;
}
.dap-charcount__current { font-weight: 600; }
.dap-charcount__current.over { color: #E10600; }

/* ============================================================
   PHONE WITH COUNTRY CODE
   ============================================================ */
.dap-phone-wrap {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.dap-phone-wrap:focus-within {
    border-color: #E10600;
    box-shadow: 0 0 0 3px rgba(225,6,0,.12);
}
.dap-phone-code {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 0 14px;
    background: #f3f4f6;
    border-right: 1.5px solid #d1d5db;
    font-size: .93rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}
.dap-phone-code.has-code {
    background: #fff5f5;
    color: #E10600;
    border-right-color: #E10600;
}
.dap-phone-number {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 0;
}
.dap-phone-number:focus { outline: none; }

/* ============================================================
   RADIO BUTTONS
   ============================================================ */
.dap-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}
.dap-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    transition: border-color .2s, background .2s;
    font-size: .93rem;
    color: #222;
    user-select: none;
}
.dap-radio:hover { border-color: #E10600; background: #fff5f5; }
.dap-radio input[type="radio"] { display: none; }
.dap-radio__box {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color .2s;
}
.dap-radio__box::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E10600;
    opacity: 0;
    transition: opacity .15s;
}
.dap-radio input[type="radio"]:checked ~ .dap-radio__box { border-color: #E10600; }
.dap-radio input[type="radio"]:checked ~ .dap-radio__box::after { opacity: 1; }
.dap-radio input[type="radio"]:checked ~ .dap-radio__label { color: #E10600; font-weight: 600; }
.dap-radio:has(input:checked) { border-color: #E10600; background: #fff5f5; }

/* ============================================================
   CHECKBOXES
   ============================================================ */
.dap-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 10px;
    margin-top: 6px;
}
.dap-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}
.dap-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 9px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    transition: border-color .2s, background .2s;
    font-size: .9rem;
    color: #222;
    user-select: none;
}
.dap-checkbox:hover { border-color: #E10600; background: #fff5f5; }
.dap-checkbox input[type="checkbox"] { display: none; }
.dap-checkbox__box {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
    transition: border-color .2s, background .2s;
}
.dap-checkbox__box::after {
    content: '✓';
    font-size: 12px;
    color: #fff;
    font-weight: 700;
    opacity: 0;
    transition: opacity .15s;
}
.dap-checkbox input:checked ~ .dap-checkbox__box { background: #E10600; border-color: #E10600; }
.dap-checkbox input:checked ~ .dap-checkbox__box::after { opacity: 1; }
.dap-checkbox:has(input:checked) { border-color: #E10600; background: #fff5f5; }

/* ============================================================
   3D FILE UPLOAD
   ============================================================ */
.dap-file-upload-field { }

.dap-file-drop {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: #fafafa;
    position: relative;
}
.dap-file-drop:hover,
.dap-file-drop.drag-over {
    border-color: #E10600;
    background: #fff5f5;
}
.dap-file-drop__icon {
    font-size: 2.4rem;
    margin-bottom: 10px;
    line-height: 1;
}
.dap-file-drop__text {
    font-size: .93rem;
    color: #555;
    margin-bottom: 8px;
}
.dap-file-browse-btn {
    color: #E10600;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 4px;
}
.dap-file-browse-btn:hover { color: #c00500; }
.dap-file-drop__formats {
    font-size: .8rem;
    color: #888;
    margin-bottom: 4px;
    letter-spacing: .02em;
}
.dap-file-drop__limit {
    font-size: .78rem;
    color: #aaa;
}
/* Hidden native file input — the label triggers it */
.dap-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Selected file indicator */
.dap-file-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1.5px solid #a7f3d0;
    background: #d1fae5;
    border-radius: 8px;
    margin-top: 10px;
    font-size: .9rem;
    color: #065f46;
    font-weight: 500;
}
.dap-file-selected__icon { font-size: 1.1rem; flex-shrink: 0; }
.dap-file-selected__name { flex: 1; word-break: break-all; }
.dap-file-remove {
    background: none;
    border: none;
    color: #065f46;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.dap-file-remove:hover { background: #a7f3d0; color: #022c22; }

/* ============================================================
   ERRORS
   ============================================================ */
.dap-error {
    font-size: .83rem;
    color: #E10600;
    margin-top: 6px;
    font-weight: 500;
}

/* ============================================================
   SUBMIT SECTION
   ============================================================ */
.dap-submit-section { text-align: center; padding-top: 16px; }
.dap-required-note { font-size: .83rem; color: #666; margin: 0 0 20px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.dap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background .2s, transform .15s, box-shadow .2s, color .2s;
    line-height: 1.4;
    font-family: inherit;
}
.dap-btn--primary {
    background: #E10600;
    color: #fff;
    border-color: #E10600;
}
.dap-btn--primary:hover {
    background: #c00500;
    border-color: #c00500;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(225,6,0,.3);
    text-decoration: none;
}
.dap-btn--outline {
    background: #fff;
    color: #E10600;
    border-color: #E10600;
}
.dap-btn--outline:hover {
    background: #fff5f5;
    color: #c00500;
    text-decoration: none;
}
.dap-btn--submit {
    background: #E10600;
    color: #fff;
    border-color: #E10600;
    padding: 15px 56px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 8px;
}
.dap-btn--submit:hover {
    background: #c00500;
    border-color: #c00500;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(225,6,0,.35);
}
.dap-btn--submit:disabled,
.dap-btn:disabled {
    background: #aaa;
    border-color: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: #fff;
}

/* ============================================================
   FORM MESSAGES
   ============================================================ */
.dap-form-message {
    margin-top: 20px;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: .93rem;
    font-weight: 500;
    line-height: 1.5;
}
.dap-form-message.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.dap-form-message.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ============================================================
   SUCCESS SCREEN
   ============================================================ */
.dap-success-screen {
    text-align: center;
    padding: 60px 32px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    max-width: 540px;
    margin: 40px auto;
}
.dap-success-screen__icon {
    font-size: 3.8rem;
    margin-bottom: 18px;
    line-height: 1;
    color: #10b981;
}
.dap-success-screen__title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #000;
    margin: 0 0 16px;
}
.dap-success-screen__body { color: #444; font-size: 1rem; line-height: 1.7; }

/* ============================================================
   STATUS VIEWS
   ============================================================ */
.dap-status {
    max-width: 640px;
    margin: 40px auto;
    padding: 48px 36px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    text-align: center;
}
.dap-status__icon { font-size: 3.2rem; margin-bottom: 20px; line-height: 1; }
.dap-status__title { font-size: 1.55rem; font-weight: 800; color: #000; margin: 0 0 24px; }
.dap-status__body { text-align: left; color: #333; font-size: .97rem; line-height: 1.7; }
.dap-status__body p { margin-bottom: 16px; }

.dap-status--pending .dap-status__icon { color: #f59e0b; }
.dap-status--active  .dap-status__icon { color: #10b981; }
.dap-status--rejected .dap-status__icon { color: #E10600; }

.dap-profile-prompt {
    background: #fff5f5;
    border-left: 4px solid #E10600;
    border-radius: 8px;
    padding: 20px 22px;
    margin: 20px 0;
}
.dap-profile-prompt h3 { color: #E10600; margin: 0 0 10px; font-size: 1rem; }
.dap-actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

.dap-rejection-reason {
    background: #fff5f5;
    border-left: 4px solid #E10600;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 22px;
}
.dap-rejection-reason h3 { color: #c00500; margin: 0 0 8px; font-size: .97rem; font-weight: 700; }
.dap-rejection-reason__text { color: #6b1111; font-size: .93rem; line-height: 1.6; }
.dap-reapply-info { background: #f9fafb; border-radius: 8px; padding: 22px; text-align: center; }
.dap-reapply-info p { margin-bottom: 16px; }

/* ============================================================
   LOGIN MESSAGE
   ============================================================ */
.dap-message {
    max-width: 480px;
    margin: 40px auto;
    padding: 48px 36px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    text-align: center;
}
.dap-message__icon { font-size: 3rem; color: #aaa; margin-bottom: 16px; }
.dap-message__icon .dashicons { font-size: 56px; width: 56px; height: 56px; }
.dap-message h3 { font-size: 1.3rem; color: #111; margin: 0 0 12px; }
.dap-message p  { color: #555; margin-bottom: 24px; }
.dap-message__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   TYPE CARDS (Section 1)
   ============================================================ */
.dap-section--type { padding-bottom: 28px; }

.dap-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dap-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
    user-select: none;
    background: #fff;
    gap: 8px;
}
.dap-type-card:hover {
    border-color: #E10600;
    background: #fff5f5;
}
.dap-type-card.is-active {
    border-color: #E10600;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(225,6,0,.1);
}
.dap-type-card input[type="radio"] { display: none; }

.dap-type-card__icon {
    font-size: 2rem;
    line-height: 1;
}
.dap-type-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #000;
}
.dap-type-card.is-active .dap-type-card__title { color: #E10600; }
.dap-type-card__desc {
    font-size: .83rem;
    color: #666;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .dap-type-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .dap-section   { padding: 22px 18px 18px; }
    .dap-header    { padding: 32px 16px 24px; }
    .dap-header__title { font-size: 1.5rem; }
    .dap-checkbox-grid { grid-template-columns: 1fr 1fr; }
    .dap-radio-group   { flex-direction: column; }
    .dap-actions   { flex-direction: column; }
    .dap-actions .dap-btn  { width: 100%; }
    .dap-btn--submit { padding: 14px 32px; width: 100%; }
    .dap-status    { padding: 32px 20px; margin: 20px 16px; }
    .dap-message   { padding: 32px 20px; margin: 20px 16px; }
    .dap-phone-code { min-width: 70px; }
}
