/* Yardstock Service Forms - Frontend Styles */
*, *::before, *::after { box-sizing: border-box; }

.ysf-wrap {
    max-width: 680px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e1e1e;
}

/* Header */
.ysf-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.ysf-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ysf-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ysf-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px !important;
    color: #1e1e1e;
    line-height: 1.2;
}
.ysf-sub {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* Form */
.ysf-form {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 24px;
}
.ysf-field {
    margin-bottom: 18px;
}
.ysf-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.ysf-req { color: #e74c3c; }

.ysf-field input[type="text"],
.ysf-field input[type="tel"],
.ysf-field input[type="email"],
.ysf-field select,
.ysf-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    appearance: none;
}
.ysf-field input:focus,
.ysf-field select:focus,
.ysf-field textarea:focus {
    outline: none;
    border-color: #1d9e75;
    box-shadow: 0 0 0 3px rgba(29,158,117,.1);
}
.ysf-field textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}
.ysf-field 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='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Urgency */
.ysf-urgency {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.ysf-urgency-opt {
    position: relative;
    cursor: pointer;
}
.ysf-urgency-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.ysf-urgency-opt span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-align: center;
    transition: all .15s;
    background: #fafafa;
    cursor: pointer;
}
.ysf-urgency-opt input:checked + span {
    border-color: #1d9e75;
    background: #e8f5f0;
    color: #0f6e56;
}
.ysf-urgency-opt span:hover {
    border-color: #aaa;
    background: #f5f5f5;
}

/* Upload */
.ysf-upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: all .15s;
}
.ysf-upload-area:hover {
    border-color: #1d9e75;
    background: #edfaf4;
}
.ysf-upload-area svg {
    color: #bbb;
    margin-bottom: 10px;
}
.ysf-up-title {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin: 0 0 4px;
}
.ysf-up-sub {
    font-size: 12px;
    color: #999;
    margin: 0 0 12px;
}
.ysf-up-btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s;
}
.ysf-upload-area:hover .ysf-up-btn {
    border-color: #1d9e75;
    color: #0f6e56;
}
.ysf-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.ysf-thumb {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.ysf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ysf-thumb-rm {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

/* Checkbox */
.ysf-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}
.ysf-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1d9e75;
}

/* Divider */
.ysf-divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

/* Submit row */
.ysf-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}
.ysf-note {
    font-size: 12px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ysf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s, transform .1s;
}
.ysf-btn:hover { opacity: .88; }
.ysf-btn:active { transform: scale(.98); }
.ysf-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Error */
.ysf-error {
    background: #fdecea;
    border: 1px solid #f5c6c2;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c0392b;
    margin-top: 12px;
}

/* Success */
.ysf-success {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
}
.ysf-success svg {
    margin-bottom: 12px;
}
.ysf-success h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1e1e1e;
}
.ysf-success p {
    font-size: 14px;
    color: #888;
    margin: 0;
    max-width: 360px;
    margin: 0 auto;
}

/* Mobile */
@media (max-width: 520px) {
    .ysf-form { padding: 16px; }
    .ysf-urgency { grid-template-columns: repeat(2, 1fr); }
    .ysf-submit-row { flex-direction: column; align-items: stretch; }
    .ysf-btn { justify-content: center; }
    .ysf-note { justify-content: center; }
}
