/* PDF Submission Plugin - Frontend Styles */

/* Enhanced Form Container */
.pdfsp-form-container {
    background: #fff;
    border: 2px solid #d32f2f;
    border-radius: 12px;
    max-width: 700px;
    margin: 24px auto;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(211, 47, 47, 0.12);
}

.pdfsp-form-container h2 {
    color: #d32f2f;
    margin: 0 0 24px;
    font-weight: 700;
    text-align: center;
    font-size: 1.75rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

/* Enhanced Field Groups */
.pdfsp-field-group {
    margin-bottom: 20px;
}

.pdfsp-label {
    display: block;
    font-size: 1rem;
    color: #c62828;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pdfsp-label .required {
    color: #d32f2f;
    margin-left: 2px;
}

.pdfsp-input,
.pdfsp-textarea,
.pdfsp-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #d32f2f;
    border-radius: 8px;
    font-size: 1rem;
    background: #faf7f7;
    color: #222;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.pdfsp-input:focus,
.pdfsp-textarea:focus,
.pdfsp-select:focus {
    border-color: #b71c1c;
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.15);
    outline: none;
    background: #fff;
}

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

/* Enhanced File Input */
.pdfsp-file-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.pdfsp-file {
    width: 100%;
    padding: 12px 14px;
    border: 2px dashed #d32f2f;
    border-radius: 8px;
    background: #fff;
    color: #222;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.pdfsp-file:hover {
    border-color: #b71c1c;
    background: #fffaf9;
}

.pdfsp-file:focus {
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.15);
    outline: none;
}

/* Enhanced Button */
.pdfsp-btn {
    background: linear-gradient(90deg, #b71c1c 10%, #d32f2f 90%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(211, 47, 47, 0.25);
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: 100%;
    margin-top: 10px;
}

.pdfsp-btn:hover,
.pdfsp-btn:focus {
    background: linear-gradient(90deg, #d32f2f 10%, #b71c1c 90%);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.35);
    transform: translateY(-2px);
}

.pdfsp-btn:active {
    transform: translateY(0);
}

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

/* Enhanced Tabs */
.pdfsp-tab-headers {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 2px solid #f0f0f0;
}

.pdfsp-tab-headers button {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    margin-bottom: -2px;
}

.pdfsp-tab-headers button:hover {
    color: #d32f2f;
    background: #fffaf9;
}

.pdfsp-tab-headers button.active {
    color: #d32f2f;
    border-bottom-color: #d32f2f;
}

.pdfsp-tab-panel {
    display: none;
    animation: pdfsp-fade-in 0.3s ease;
}

.pdfsp-tab-panel.active {
    display: block;
}

@keyframes pdfsp-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Cards */
.ilan-card {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
    transition: all 0.3s ease;
}

.ilan-card:hover {
    border-color: #d32f2f;
    box-shadow: 0 4px 20px rgba(211, 47, 47, 0.15);
    transform: translateY(-2px);
}

.ilan-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #b71c1c;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.ilan-title:hover {
    color: #d32f2f;
}

.ilan-meta {
    color: #666;
    font-size: 0.95rem;
    margin-top: 8px;
    line-height: 1.6;
}

.ilan-meta strong {
    color: #333;
}

.ilan-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.ilan-apply-btn {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ilan-apply-btn:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

/* Tips and Help */
.pdfsp-tip {
    font-size: 0.9em;
    color: #666;
    margin-top: 6px;
    line-height: 1.4;
}

/* Success Message */
.pdfsp-success-message {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
}

/* Error Message */
.pdfsp-error-message {
    background: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 600;
}

/* Loading State */
.pdfsp-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.pdfsp-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d32f2f;
    border-radius: 50%;
    animation: pdfsp-spin 1s linear infinite;
}

@keyframes pdfsp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table Styles */
.pdfsp-list table.widefat {
    border: 2px solid #d32f2f;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.pdfsp-list table.widefat thead th {
    background: linear-gradient(180deg, #fffaf9 0%, #fff3f3 100%);
    color: #b71c1c;
    font-weight: 800;
    padding: 14px;
    text-align: left;
}

.pdfsp-list table.widefat td,
.pdfsp-list table.widefat th {
    padding: 14px;
}

.pdfsp-list table.widefat tbody tr:nth-child(odd) {
    background: #fffaf9;
}

.pdfsp-list table.widefat tbody tr:hover {
    background: #fff3f3;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .pdfsp-form-container {
        padding: 20px;
        margin: 16px;
    }
    
    .pdfsp-form-container h2 {
        font-size: 1.5rem;
    }
    
    .pdfsp-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .pdfsp-tab-headers {
        flex-direction: column;
        gap: 0;
    }
    
    .pdfsp-tab-headers button {
        width: 100%;
        text-align: left;
    }
    
    .ilan-card {
        padding: 16px;
    }
    
    .ilan-actions {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .pdfsp-form-container {
        padding: 16px;
    }
    
    .pdfsp-input,
    .pdfsp-textarea,
    .pdfsp-select,
    .pdfsp-file {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

