/**
 * Bagdrop Form Styles
 * Styles for bagdrop form and related components
 */

/* Main Container */
.bagdrop-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.bagdrop-form-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* Header Section */
.bagdrop-header {
    text-align: center;
    margin-bottom: 35px;
}

.bagdrop-header h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.bagdrop-header .description {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Product Info Section */
.bagdrop-product-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 35px;
}

.product-details h4 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.product-item + .product-item {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
}

.bagdrop-insurance-info .product-name {
    font-weight: 500;
}

.product-name {
    font-weight: 600;
    color: #495057;
    font-size: 16px;
}

.product-price {
    font-weight: 700;
    color: #28a745;
    font-size: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20a643 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 6px;
}

/* Form Elements */
.form-row {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 16px;
}

.required {
    color: #dc3545;
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

.form-input.error {
    border-color: #dc3545;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.field-description {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

.field-error {
    display: block;
    color: #dc3545;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
}

/* Checkbox Styles */
.form-checkbox {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
}

.bagdrop-insurance-row .form-checkbox {
    margin-bottom: 0;
}

.bagdrop-insurance-row .checkbox-label {
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    background: #ffffff;
}

.bagdrop-insurance-row .insurance-label-text {
    font-weight: 600;
    color: #374151;
}

.bagdrop-insurance-row .insurance-price {
    font-weight: 700;
    color: #198754;
}

.char-counter {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    margin-left: 10px;
}

.char-counter.over-limit {
    color: #dc3545;
    font-weight: 600;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 35px;
}

.button-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 280px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.button-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
}

.button-primary:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-text {
    transition: opacity 0.3s ease;
}

.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top: 3px solid transparent;
    animation: spin 1s linear infinite;
    margin: 0;
}

.spinner.large {
    width: 32px;
    height: 32px;
    border-width: 4px;
}

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

/* Loading Overlay */
.bagdrop-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: #ffffff;
    padding: 40px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    max-width: 400px;
}

.loading-content .spinner.large {
    margin-bottom: 20px;
}

.loading-content p {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

/* Messages */
.bagdrop-messages {
    margin-top: 20px;
    min-height: 60px;
}

.woocommerce-message,
.woocommerce-error {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
    animation: slideInUp 0.5s ease;
}

.woocommerce-message {
    background: linear-gradient(135deg, #d1ecf1 0%, #a7f3d0 100%);
    color: #0f5132;
    border-left: 4px solid #28a745;
}

.woocommerce-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #e74c3c;
}

.woocommerce-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #0dcaf0;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Sections */
.bagdrop-form-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.bagdrop-info-section,
.bagdrop-faq-section {
    margin-bottom: 40px;
}

.bagdrop-info-section h4,
.bagdrop-faq-section h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bagdrop-info-section h4::before,
.bagdrop-faq-section h4::before {
    content: "ℹ️";
    font-size: 20px;
}

.bagdrop-faq-section h4::before {
    content: "❓";
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    margin-bottom: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.info-list li:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.info-list li strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.faq-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.faq-answer {
    color: #6c757d;
    line-height: 1.6;
    font-size: 15px;
}

/* Status Page Styles */
.bagdrop-status-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.bagdrop-orders-list {
    display: grid;
    gap: 20px;
}

.bagdrop-order-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.bagdrop-order-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.order-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.status-processing {
    background: linear-gradient(135deg, #cfe2ff 0%, #b3d9ff 100%);
    color: #004085;
}

.status-completed {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.status-failed {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.status-refunded {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    color: #6c757d;
}

.order-details {
    display: grid;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item .label {
    font-weight: 600;
    color: #6c757d;
    font-size: 14px;
}

.detail-item .value {
    color: #2c3e50;
    font-size: 15px;
    font-weight: 500;
}

.detail-item a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.detail-item a:hover {
    text-decoration: underline;
}

/* Product Info Styles */
.bagdrop-product-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.product-image {
    margin-bottom: 20px;
}

.product-image img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-details h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.product-details .price {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 15px;
}

.product-details .description {
    color: #6c757d;
    line-height: 1.6;
    font-size: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bagdrop-form-wrapper {
        padding: 10px;
    }
    
    .bagdrop-form-container {
        padding: 25px;
    }
    
    .bagdrop-header h3 {
        font-size: 24px;
    }
    
    .form-input {
        padding: 14px;
        font-size: 16px;
    }
    
    .button-primary {
        width: 100%;
        min-width: auto;
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .bagdrop-orders-list {
        grid-template-columns: 1fr;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-details {
        gap: 10px;
    }
    
    .info-list li {
        padding: 15px;
    }
    
    .faq-item {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .bagdrop-form-container {
        padding: 20px;
    }
    
    .bagdrop-header h3 {
        font-size: 22px;
    }
    
    .form-input {
        padding: 12px;
        font-size: 16px;
    }
    
    .button-primary {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .loading-content {
        margin: 20px;
        padding: 30px;
    }
    
    .loading-content p {
        font-size: 16px;
    }
}

/* Animation Enhancements */
.bagdrop-form-container {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus Management */
.form-input:focus,
.checkbox-label:focus-within {
    outline: none;
}

/* Accessibility */
.bagdrop-form-container *:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .bagdrop-form-footer,
    .form-actions,
    .bagdrop-loading-overlay {
        display: none;
    }
    
    .bagdrop-form-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}
