/* Podcast Submission Form - Dark Theme Design */

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

.podcast-container {
    max-width: 1200px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    box-sizing: border-box;
}

.podcast-layout {
    display: flex !important;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: nowrap !important;
}

.podcast-main {
    flex: 1 1 auto !important;
    min-width: 0;
    width: auto !important;
    margin: 0;
    padding: 0;
}

.podcast-sidebar {
    flex: 0 0 auto !important;
    width: 450px !important;
    min-width: 300px;
    max-width: 450px;
    margin: 0;
    padding: 0;
}

.podcast-card {
    background: #1f1f1f;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    padding: 40px;
    margin-bottom: 0;
    margin-top: 0;
    transition: box-shadow 0.3s ease;
    border: 1px solid #2a2a2a;
}

.podcast-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.podcast-title {
    font-size: 28px;
    font-weight: 700;
    color: #e0e0e0;
    margin: 0 0 30px 0;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #2a2a2a;
}

/* Success Card Styling */
.success-card {
    text-align: center;
    border-top: 4px solid #46b450;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #46b450;
    color: white;
    font-size: 48px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.submission-id-box {
    background: #2a2a2a;
    border: 2px dashed #46b450;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-size: 18px;
}

.submission-id-box strong {
    color: #46b450;
    font-size: 24px;
}

.success-message {
    text-align: right;
    line-height: 1.8;
    color: #c0c0c0;
    margin-top: 20px;
}

.success-message p {
    margin-bottom: 15px;
}

.success-message strong {
    color: #f0ad4e;
    font-weight: 600;
}

/* Form Styling */
.podcast-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    background: #2a2a2a;
    color: #e0e0e0;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1165dc;
    background: #1f1f1f;
    box-shadow: 0 0 0 3px rgba(17, 101, 220, 0.2);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e0e0e0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
}

.form-group textarea {
    line-height: 1.6;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #999;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.file-upload-wrapper input[type="file"] {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed #3a3a3a;
    border-radius: 8px;
    background: #2a2a2a;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-label:hover {
    border-color: #1165dc;
    background: #252525;
}

.file-upload-wrapper.drag-over .file-upload-label {
    border-color: #1165dc;
    background: #1f1f1f;
    box-shadow: 0 0 0 3px rgba(17, 101, 220, 0.2);
}

.file-upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.file-upload-text {
    color: #c0c0c0;
    font-size: 15px;
    font-weight: 500;
}

#file-info {
    display: block;
    margin-top: 8px;
    font-size: 14px;
}

.file-selected {
    color: #46b450;
    font-weight: 500;
}

.file-error {
    color: #dc3545;
    font-weight: 500;
}

/* Checkbox Group */
.checkbox-group {
    display: flex !important;
    align-items: flex-start;
    margin-bottom: 30px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    padding: 0;
    margin-top: 5px;
    margin-left: 12px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    border: 2px solid #3a3a3a;
    border-radius: 4px;
    background: #2a2a2a;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.3s ease;
}

.checkbox-group input[type="checkbox"]:hover {
    border-color: #1165dc;
}

.checkbox-group input[type="checkbox"]:checked {
    background: #1165dc;
    border-color: #1165dc;
    position: relative;
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
}

.checkbox-group label {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Error Message */
.error-message {
    background: #3a2a1a;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    color: #ffcc66;
    font-size: 14px;
    line-height: 1.6;
}

.error-message strong {
    font-weight: 700;
}

/* Submit Button */
.form-actions {
    margin-top: 35px;
}

.btn-submit {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #1165dc 0%, #0d4fa3 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(17, 101, 220, 0.4);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0d4fa3 0%, #0a3d82 100%);
    box-shadow: 0 6px 16px rgba(17, 101, 220, 0.5);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(17, 101, 220, 0.4);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Entry Content */
.entry-content {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    line-height: 1.8;
    color: #c0c0c0;
    height: fit-content;
    position: sticky;
    top: 20px;
    margin: 0;
}

.podcast-sidebar .entry-content a {
    color: #a268f6;
}

.podcast-sidebar .entry-content a:hover {
    color: #c1a9e3;
}

.entry-content h2,
.entry-content h3 {
    color: #e0e0e0;
    margin-top: 25px;
    margin-bottom: 15px;
}

.entry-content p {
    margin-bottom: 15px;
}

/* Medium screens - adjust sidebar */
@media (max-width: 1100px) and (min-width: 901px) {
    .podcast-sidebar {
        width: 320px !important;
    }

    .podcast-card {
        padding: 32px;
    }
}

/* Tablet Responsive */
@media (max-width: 900px) {
    .podcast-container {
        max-width: 640px;
        padding: 0 20px;
    }

    .podcast-layout {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 0;
    }

    .podcast-main {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .podcast-sidebar {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .entry-content {
        position: static;
        margin-top: 30px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .podcast-container {
        margin: 20px auto;
        padding: 0 16px;
    }

    .podcast-layout {
        flex-direction: column !important;
    }

    .podcast-card {
        padding: 30px 20px;
        border-radius: 10px;
    }

    .podcast-title {
        font-size: 24px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 38px;
        line-height: 64px;
    }

    .submission-id-box {
        padding: 16px;
        font-size: 16px;
    }

    .submission-id-box strong {
        font-size: 22px;
    }

    .form-group {
        margin-bottom: 22px;
    }

    .form-group label {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px;
        /* Ensure minimum 16px font to prevent zoom on iOS */
        min-height: 48px; /* Touch-friendly target */
    }

    .form-group select {
        background-position: left 16px center;
        padding-left: 40px;
    }

    .file-upload-label {
        padding: 30px 20px;
    }

    .btn-submit {
        padding: 16px 24px;
        font-size: 17px;
        min-height: 52px; /* Touch-friendly button */
    }

    .entry-content {
        padding: 24px 20px;
        border-radius: 10px;
        margin-top: 24px;
    }

    .success-message ul {
        padding-right: 24px;
    }
}

@media (max-width: 480px) {
    .podcast-container {
        margin: 16px auto;
        padding: 0 12px;
    }

    .podcast-card {
        padding: 24px 16px;
        border-radius: 8px;
    }

    .podcast-title {
        font-size: 21px;
        margin-bottom: 20px;
        padding-bottom: 14px;
    }

    .success-icon {
        width: 56px;
        height: 56px;
        font-size: 32px;
        line-height: 56px;
    }

    .submission-id-box {
        padding: 14px;
        font-size: 15px;
    }

    .submission-id-box strong {
        font-size: 20px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px; /* Keep 16px to prevent iOS zoom */
        min-height: 46px;
    }

    .form-group select {
        background-position: left 14px center;
        padding-left: 38px;
    }

    .file-upload-label {
        padding: 25px 15px;
    }

    .file-upload-icon {
        font-size: 28px;
    }

    .btn-submit {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 50px;
    }

    .entry-content {
        padding: 20px 16px;
        margin-top: 20px;
        border-radius: 8px;
    }

    .error-message {
        padding: 12px 16px;
        font-size: 13px;
    }

    .checkbox-group {
        flex-direction: column;
    }

    .checkbox-group input[type="checkbox"] {
        margin-left: 0;
        margin-bottom: 10px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .podcast-container {
        margin: 16px auto;
    }

    .podcast-card {
        padding: 24px;
    }

    .podcast-title {
        font-size: 22px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .btn-submit {
        min-height: 48px;
    }
}

/* Loading State */
.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .podcast-layout {
        flex-direction: column;
    }

    .podcast-card {
        box-shadow: none;
        border: 1px solid #ddd;
        background: white;
        color: black;
        page-break-inside: avoid;
    }

    .btn-submit {
        display: none;
    }

    .entry-content {
        background: white;
        color: black;
        position: static;
        page-break-inside: avoid;
    }

    .podcast-sidebar {
        margin-top: 20px;
    }
}
