/* ============================================================
   Web Project Tracker – Frontend Styles v1.3
   ============================================================ */

:root {
    --wpt-primary:    #00c2cb;
    --wpt-primary-d:  #0a2540;
    --wpt-success:    #0a2540;
    --wpt-warning:    #f59e0b;
    --wpt-danger:     #ef4444;
    --wpt-gray-50:    #f9fafb;
    --wpt-gray-100:   #f3f4f6;
    --wpt-gray-200:   #e5e7eb;
    --wpt-gray-400:   #9ca3af;
    --wpt-gray-600:   #4b5563;
    --wpt-gray-800:   #1f2937;
    --wpt-radius:     12px;
    --wpt-shadow:     0 4px 24px rgba(0,0,0,.08);
    --wpt-transition: .2s ease;
}

/* ── Wrapper ───────────────────────────────────────────────── */
.wpt-my-account,
.wpt-tracker,
.wpt-tracker * { box-sizing: border-box; }

.wpt-tracker {
    background: #fff !important;
    border-radius: var(--wpt-radius) !important;
    box-shadow: var(--wpt-shadow) !important;
    overflow: hidden;
    margin-bottom: 2rem;
    border: none !important;
}

/* ── Progress header ───────────────────────────────────────── */
.wpt-progress-header {
    background: linear-gradient(135deg, #0a2540 0%, #0e3a6e 100%) !important;
    color: #fff !important;
    padding: 28px 32px 24px;
}

.wpt-project-title {
    margin: 0 0 16px !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    border: none !important;
    padding: 0 !important;
}

.wpt-progress-bar-wrap {
    background: rgba(255,255,255,.2);
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wpt-progress-bar {
    background: #00c2cb !important;
    height: 100%;
    border-radius: 100px;
    transition: width .6s cubic-bezier(.4,0,.2,1);
}

.wpt-progress-label { font-size: .85rem; opacity: .85; color: #fff; }

/* ── Stepper ───────────────────────────────────────────────── */
.wpt-stepper {
    display: flex;
    padding: 24px 32px;
    overflow-x: auto;
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb;
}

.wpt-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    min-width: 80px;
}

.wpt-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .875rem;
    z-index: 1;
    position: relative;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #9ca3af;
    transition: all var(--wpt-transition);
}

.wpt-step-completed .wpt-step-circle {
    background: #00c2cb !important;
    color: #fff !important;
    border-color: #00c2cb !important;
}
.wpt-step-completed .wpt-step-circle svg { width: 18px; height: 18px; }

.wpt-step-active .wpt-step-circle {
    background: #0a2540 !important;
    color: #fff !important;
    border-color: #0a2540 !important;
    box-shadow: 0 0 0 4px rgba(0,194,203,.25);
}

.wpt-step-line {
    position: absolute;
    top: 19px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}
.wpt-step-completed .wpt-step-line { background: #00c2cb !important; }

.wpt-step-label {
    font-size: .68rem;
    margin-top: 8px;
    text-align: center;
    color: #9ca3af;
    line-height: 1.3;
    max-width: 85px;
}
.wpt-step-active .wpt-step-label    { color: #0a2540 !important; font-weight: 700; }
.wpt-step-completed .wpt-step-label { color: #00c2cb !important; }

/* ── Phase content ─────────────────────────────────────────── */
.wpt-phase-content { padding: 32px; }

.wpt-phase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wpt-phase-badge {
    display: inline-block !important;
    background: #00c2cb !important;
    color: #fff !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 100px !important;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.wpt-phase-title {
    margin: 0 !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #0a2540 !important;
    border: none !important;
    padding: 0 !important;
}

.wpt-phase-description { color: #4b5563; line-height: 1.7; margin-bottom: 24px; }

/* ── Project URL box ───────────────────────────────────────── */
.wpt-project-url-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #e6fafb !important;
    border: 1px solid #a0e8eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.wpt-url-icon { font-size: 1.5rem; flex-shrink: 0; }
.wpt-url-link { color: #0a2540 !important; font-weight: 600; word-break: break-all; text-decoration: none; }
.wpt-url-link:hover { color: #00c2cb !important; }

/* ── Delivered ─────────────────────────────────────────────── */
.wpt-delivered-box {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #e6fafb, #f0f9ff) !important;
    border-radius: var(--wpt-radius);
    border: 1px solid #a0e8eb;
}
.wpt-delivered-icon { font-size: 3.5rem; margin-bottom: 12px; }
.wpt-delivered-box h3 { font-size: 1.4rem !important; color: #0a2540 !important; margin: 0 0 8px !important; border: none !important; }
.wpt-delivered-box p  { color: #4b5563; margin: 0 0 24px; }

/* ── Buttons ───────────────────────────────────────────────── */
.wpt-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

.wpt-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 11px 22px !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: all var(--wpt-transition);
    line-height: 1 !important;
}
.wpt-btn-primary { background: #00c2cb !important; color: #fff !important; }
.wpt-btn-primary:hover { background: #0a2540 !important; color: #fff !important; transform: translateY(-1px); }
.wpt-btn-success { background: #0a2540 !important; color: #fff !important; }
.wpt-btn-success:hover { background: #061a2e !important; color: #fff !important; transform: translateY(-1px); }
.wpt-btn-secondary { background: #f3f4f6 !important; color: #1f2937 !important; border: 1px solid #e5e7eb !important; }
.wpt-btn-secondary:hover { background: #e5e7eb !important; }

/* ── Form wrapper ──────────────────────────────────────────── */
.wpt-form-wrap {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--wpt-radius);
    padding: 24px;
    margin-bottom: 20px;
}
.wpt-form-wrap h4 { margin: 0 0 20px !important; font-weight: 700 !important; color: #0a2540 !important; border: none !important; padding: 0 !important; }
.wpt-hidden { display: none !important; }

/* ── Fields ────────────────────────────────────────────────── */
.wpt-field { margin-bottom: 20px; }

.wpt-field > label {
    display: block !important;
    font-weight: 600 !important;
    font-size: .875rem !important;
    color: #0a2540 !important;
    margin-bottom: 7px !important;
}

.wpt-required { color: #ef4444; margin-left: 2px; }

.wpt-field input[type="text"],
.wpt-field input[type="url"],
.wpt-field input[type="email"],
.wpt-field input[type="number"],
.wpt-field textarea,
.wpt-field select {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: .93rem !important;
    font-family: inherit !important;
    color: #1f2937 !important;
    background: #fff !important;
    outline: none !important;
    transition: border-color var(--wpt-transition), box-shadow var(--wpt-transition);
    box-shadow: none !important;
}
.wpt-field input:focus,
.wpt-field textarea:focus,
.wpt-field select:focus {
    border-color: #00c2cb !important;
    box-shadow: 0 0 0 3px rgba(0,194,203,.15) !important;
}

/* ── Custom WP-style editor ────────────────────────────────── */
.wpt-editor-wrap {
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color var(--wpt-transition), box-shadow var(--wpt-transition);
}
.wpt-editor-wrap:focus-within {
    border-color: #00c2cb !important;
    box-shadow: 0 0 0 3px rgba(0,194,203,.15) !important;
}

.wpt-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.wpt-tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    font-size: .82rem;
    font-family: inherit;
    transition: all .15s;
    line-height: 1;
}
.wpt-tb-btn:hover, .wpt-attach-label:hover {
    background: #fff;
    border-color: #e5e7eb;
    color: #0a2540;
}
.wpt-tb-sep {
    width: 1px;
    height: 18px;
    background: #e5e7eb;
    margin: 0 4px;
}
.wpt-attach-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    transition: all .15s;
    position: relative;
    overflow: hidden;
}
.wpt-attach-label:hover { border-color: #00c2cb; color: #00c2cb; }

/* File input inside label: invisible but clickable via the label */
.wpt-attach-label .wpt-img-pick {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.wpt-editor-body {
    min-height: 140px;
    padding: 12px 16px;
    font-size: .93rem;
    color: #1f2937;
    line-height: 1.7;
    outline: none;
    cursor: text;
}
.wpt-editor-body:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}
.wpt-editor-body.wpt-editor-error { background: #fef2f2; }

.wpt-editor-hidden { display: none !important; }

/* ── File previews / upload zones ─────────────────────────── */
.wpt-hidden-input { display: none !important; position: absolute; }

.wpt-attach-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px 12px;
}
.wpt-attach-previews:empty { padding: 0; }

.wpt-upload-zone {
    border: 2px dashed #e5e7eb;
    border-radius: var(--wpt-radius);
    background: #f9fafb;
    transition: all var(--wpt-transition);
}
.wpt-upload-zone:hover,
.wpt-upload-zone.wpt-dragover { border-color: #00c2cb; background: #e6fafb; }

.wpt-upload-zone-inner {
    padding: 28px 20px;
    text-align: center;
}
.wpt-upload-icon { font-size: 2.2rem; display: block; margin-bottom: 8px; }
.wpt-upload-zone-inner p { margin: 0 0 4px !important; font-weight: 600; color: #0a2540; }
.wpt-upload-zone-inner small { color: #9ca3af; font-size: .8rem; }

.wpt-file-inputs-container { display: none; }

.wpt-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}
.wpt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wpt-thumb-remove {
    position: absolute;
    top: 3px; right: 3px;
    width: 20px; height: 20px;
    background: rgba(0,0,0,.65);
    color: #fff;
    border: none; border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

.wpt-file-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: .8rem;
    color: #0a2540;
    font-weight: 500;
    max-width: 220px;
}
.wpt-file-item span { color: #9ca3af; }
.wpt-file-remove {
    background: none; border: none; cursor: pointer;
    color: #ef4444; font-size: .75rem; padding: 0 2px;
}

/* ── Messages ──────────────────────────────────────────────── */
.wpt-success-msg,
.wpt-error-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 500;
    margin-top: 16px;
}
.wpt-success-msg { background: #e6fafb; color: #0a2540; border: 1px solid #a0e8eb; }
.wpt-error-msg   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Stars ─────────────────────────────────────────────────── */
.wpt-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; font-size: 1.8rem; }
.wpt-stars input { display: none; }
.wpt-stars label { color: #e5e7eb; cursor: pointer; transition: color .15s; font-weight: normal; }
.wpt-stars input:checked ~ label,
.wpt-stars label:hover,
.wpt-stars label:hover ~ label { color: #f59e0b; }

/* ── Project tabs ──────────────────────────────────────────── */
.wpt-project-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.wpt-tab {
    padding: 8px 18px; border-radius: 100px;
    background: #f3f4f6; color: #4b5563;
    font-weight: 600; font-size: .875rem;
    text-decoration: none !important;
    transition: all var(--wpt-transition);
}
.wpt-tab:hover { background: #e5e7eb; color: #1f2937 !important; }
.wpt-tab-active { background: #00c2cb !important; color: #fff !important; }

/* ── Lookup & empty ────────────────────────────────────────── */
.wpt-empty { color: #9ca3af; margin-bottom: 12px; }
.wpt-lookup-form input[type="number"] {
    padding: 9px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: .93rem; outline: none;
}
.wpt-lookup-form button {
    padding: 9px 18px; background: #00c2cb; color: #fff;
    border: none; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.wpt-lookup-form button:hover { background: #0a2540; }

/* ── Review form ───────────────────────────────────────────── */
.wpt-review-form {
    background: #fff; border: 1px solid #e5e7eb;
    border-radius: var(--wpt-radius); padding: 24px; max-width: 520px; margin: 0 auto;
}
.wpt-review-form h4 { margin: 0 0 20px !important; color: #0a2540 !important; border: none !important; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .wpt-progress-header, .wpt-phase-content { padding: 20px; }
    .wpt-stepper { padding: 20px 12px; }
    .wpt-step-label { font-size: .62rem; max-width: 70px; }
    .wpt-step-circle { width: 34px; height: 34px; font-size: .8rem; }
    .wpt-actions { flex-direction: column; }
    .wpt-btn { justify-content: center; }
}

/* ── Admin files box for client ────────────────────────────── */
.wpt-admin-files-box {
    background: #fff8e6;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.wpt-admin-files-title {
    font-weight: 700;
    color: #0a2540;
    margin-bottom: 12px;
    font-size: .9rem;
}
.wpt-admin-files-list { display: flex; flex-direction: column; gap: 8px; }
.wpt-admin-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    text-decoration: none !important;
    color: #0a2540 !important;
    transition: all .15s;
}
.wpt-admin-file-item:hover { border-color: #00c2cb; background: #e6fafb; }
.wpt-admin-file-item strong { display: block; font-size: .875rem; }
.wpt-admin-file-item small  { color: #9ca3af; font-size: .75rem; }
.wpt-download-icon { margin-left: auto; font-size: 1.1rem; color: #00c2cb; }

/* ── Editor drag state ────────────────────────────────────── */
.wpt-editor-body.wpt-editor-dragover {
    background: #e6fafb !important;
    outline: 2px dashed #00c2cb;
    outline-offset: -2px;
}

/* ── Delivered info box ────────────────────────────────── */
.wpt-delivered-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255,255,255,.7);
    border: 1px solid #a0e8eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px auto 0;
    max-width: 480px;
    text-align: left;
}
.wpt-delivered-info-icon { font-size: 1.6rem; flex-shrink: 0; }
.wpt-delivered-info strong { display: block; font-size: .9rem; color: #0a2540; margin-bottom: 4px; }
.wpt-delivered-info span  { font-size: .85rem; color: #4b5563; line-height: 1.5; }
