/* Frontend styles for Priority Ticket Payment */

.priority-ticket-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.priority-ticket-form-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.priority-ticket-form-container p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

/* Price display */
.price-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.price-display strong {
    font-size: 20px;
    font-weight: 700;
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

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

.form-group label.required::after {
    content: " *";
    color: #e74c3c;
}

/* Form controls */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:invalid {
    border-color: #e74c3c;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* File input styling */
.form-control[type="file"] {
    padding: 8px 12px;
    background: #f8f9fa;
    border-style: dashed;
}

.form-control[type="file"]:hover {
    background: #e9ecef;
}

/* Enhanced file upload button styling */
.incremental-upload-button {
    font-family: inherit !important;
    letter-spacing: 0.5px;
    text-transform: none;
    position: relative;
    overflow: hidden;
}

.incremental-upload-button::before {
    content: "📎";
    margin-right: 8px;
    font-size: 16px;
}

.incremental-upload-button:active {
    transform: translateY(1px) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

.incremental-file-upload-wrapper {
    margin-bottom: 15px;
}

.file-list-container .file-item {
    animation: fadeIn 0.3s ease;
}

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

.upload-status {
    font-weight: 500;
    transition: color 0.3s ease;
}

.remove-file-button:hover {
    background: #d32f2f !important;
    transform: scale(1.05);
}

/* Responsive file upload styling */
@media (max-width: 768px) {
    .incremental-upload-button {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }
    
    .remove-file-button {
        align-self: flex-end;
        margin-left: 0 !important;
    }
}

/* Form text */
.form-text {
    display: block;
    margin-top: 6px;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 0;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Form actions */
.form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* Form messages */
.form-messages {
    margin-top: 20px;
}

.form-messages .notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.form-messages .notice-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-messages .notice-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-messages .notice-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.form-messages .notice-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Status page */
.priority-ticket-status-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.priority-ticket-status-container h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Status table */
.priority-tickets-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.priority-tickets-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-tickets-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e1e5e9;
    font-size: 14px;
}

.priority-tickets-table tr:last-child td {
    border-bottom: none;
}

.priority-tickets-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}



.status-completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-refunded {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #c6c8ca;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    text-decoration: none;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    color: #667eea;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
    text-decoration: none;
}

.pagination .current {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .prev,
.pagination .next {
    font-weight: 600;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .priority-ticket-form-container,
    .priority-ticket-status-container {
        margin: 0 15px;
        padding: 15px;
    }
    
    .priority-tickets-table {
        font-size: 12px;
    }
    
    .priority-tickets-table th,
    .priority-tickets-table td {
        padding: 10px 8px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 600px) {
    .priority-tickets-table thead {
        display: none;
    }
    
    .priority-tickets-table,
    .priority-tickets-table tbody,
    .priority-tickets-table tr,
    .priority-tickets-table td {
        display: block;
    }
    
    .priority-tickets-table tr {
        border: 1px solid #e1e5e9;
        margin-bottom: 15px;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .priority-tickets-table td {
        border-bottom: 1px solid #e1e5e9;
        position: relative;
        padding-left: 50%;
        text-align: left;
    }
    
    .priority-tickets-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 12px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #333;
    }
    
    .priority-tickets-table td:last-child {
        border-bottom: none;
    }
}

/* Accessibility improvements */
.form-control:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .status-badge {
        border-width: 2px;
        font-weight: bold;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Character limit styling */
.priority-ticket-char-limit-container {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.priority-ticket-char-counter {
    padding-left: 20px !important;
} 