/* ============================================================
   DigiSay Podcast Form — Frontend Styles
   Matches the wireframe visual design
   ============================================================ */

/* Reset to avoid theme overrides */
.digisay-card *,
.digisay-card *::before,
.digisay-card *::after {
    box-sizing: border-box;
}

.digisay-card input,
.digisay-card textarea,
.digisay-card button,
.digisay-card select {
    font-family: inherit;
    line-height: 1.5;
}

.digisay-card input[type="text"],
.digisay-card input[type="email"],
.digisay-card input[type="url"],
.digisay-card textarea {
    -webkit-appearance: none;
    appearance: none;
}

.digisay-card {
    max-width: 720px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a2e;
    line-height: 1.6;
}

.digisay-card .digisay-form {
    margin: 0;
    padding: 0;
}

/* Card header (dark, like the wireframe page header) */
.digisay-card-header {
    background: #1a1a2e;
    color: #ffffff;
    padding: 32px 40px;
    border-radius: 16px 16px 0 0;
}

.digisay-card-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.digisay-card-header p {
    color: #aaaaaa;
    font-size: 14px;
    margin: 0;
}

/* Progress bar */
.digisay-progress {
    height: 4px;
    background: #e0e0e0;
    position: relative;
}

.digisay-progress-fill {
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, #1a1a2e, #4dabf7);
    transition: width 0.3s ease;
}

.digisay-progress-label {
    position: absolute;
    top: 12px;
    right: 40px;
    font-size: 11px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
.digisay-section {
    padding: 32px 40px;
    border-bottom: 1px solid #eee;
    position: relative;
}

/* Section 1 needs extra top padding so the orange tag isn't clipped by the dark header */
.digisay-section:first-of-type {
    padding-top: 44px;
}

.digisay-section:last-of-type {
    border-bottom: none;
}

/* Section tag (orange label, like the wireframe) */
.digisay-section-tag {
    position: absolute;
    top: -12px;
    left: 24px;
    background: #ffa94d;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 4px;
    z-index: 5;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.digisay-section-tag-fun {
    background: #69db7c;
}

/* Section header */
.digisay-section-header {
    margin-bottom: 24px;
}

.digisay-section-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #1a1a2e;
}

.digisay-section-header p {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* Fun section background */
.digisay-section-fun {
    background: linear-gradient(135deg, #fffbe6 0%, #ffffff 60%);
    border-radius: 0 0 16px 16px;
}

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

.digisay-field:last-child {
    margin-bottom: 0;
}

.digisay-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.digisay-req {
    color: #ff6b6b;
    font-weight: 700;
}

.digisay-opt {
    font-size: 10px;
    font-weight: 700;
    color: #4dabf7;
    background: rgba(77, 171, 247, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.digisay-hint {
    font-size: 11px;
    color: #999999;
    margin-top: 6px;
    font-style: italic;
}

/* Inputs */
.digisay-field input[type="text"],
.digisay-field input[type="email"],
.digisay-field input[type="url"],
.digisay-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fafafa;
    color: #1a1a2e;
    transition: all 0.2s;
    box-sizing: border-box;
}

.digisay-field input:focus,
.digisay-field textarea:focus {
    outline: none;
    border-color: #4dabf7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.15);
}

.digisay-field textarea {
    resize: vertical;
    min-height: 100px;
}

.digisay-field input::placeholder,
.digisay-field textarea::placeholder {
    color: #b0b0b0;
}

/* Radio groups */
.digisay-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.digisay-radio-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.digisay-radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    margin: 0;
    transition: all 0.2s;
    color: #1a1a2e;
}

.digisay-radio-item:hover {
    border-color: #4dabf7;
    background: rgba(77, 171, 247, 0.05);
}

.digisay-radio-item input[type="radio"] {
    display: none;
}

.digisay-radio-dot {
    width: 18px;
    height: 18px;
    border: 2px solid #cccccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.digisay-radio-item input[type="radio"]:checked + .digisay-radio-dot {
    border-color: #1a1a2e;
}

.digisay-radio-item input[type="radio"]:checked + .digisay-radio-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #1a1a2e;
    border-radius: 50%;
}

.digisay-radio-item:has(input[type="radio"]:checked) {
    border-color: #1a1a2e;
    background: rgba(26, 26, 46, 0.04);
}

/* Conditional reveal */
.digisay-conditional {
    display: none;
    margin-top: 16px;
    padding: 16px 20px;
    border-left: 3px solid #da77f2;
    background: rgba(218, 119, 242, 0.04);
    border-radius: 0 8px 8px 0;
}

.digisay-conditional.visible {
    display: block;
}

.digisay-conditional-label {
    font-size: 12px;
    font-weight: 700;
    color: #da77f2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Submit row */
.digisay-submit-row {
    padding: 24px 40px 32px;
    text-align: center;
}

.digisay-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: #1a1a2e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.digisay-submit:hover {
    background: #2d2d4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.digisay-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.digisay-feedback {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.digisay-feedback.success {
    display: block;
    background: #d3f9d8;
    color: #2b8a3e;
    border: 1px solid #69db7c;
}

.digisay-feedback.error {
    display: block;
    background: #ffe3e3;
    color: #c92a2a;
    border: 1px solid #ff6b6b;
}

/* Field-level error */
.digisay-field.has-error input,
.digisay-field.has-error textarea {
    border-color: #ff6b6b;
    background: #fff5f5;
}

/* Mobile */
@media (max-width: 600px) {
    .digisay-card { margin: 20px 0; border-radius: 0; }
    .digisay-card-header { padding: 24px 20px; border-radius: 0; }
    .digisay-card-header h1 { font-size: 20px; }
    .digisay-progress-label { right: 20px; }
    .digisay-section { padding: 28px 20px; }
    .digisay-section:first-of-type { padding-top: 40px; }
    .digisay-section-tag { left: 12px; }
    .digisay-submit-row { padding: 20px 16px 28px; }
    .digisay-submit { width: 100%; justify-content: center; }
    .digisay-radio-inline { flex-direction: column; gap: 8px; }
}
