/* Frontend Styles for Altalayi Ticket System */

/* Utilities */
.altalayi-hidden {
    display: none !important;
}

.altalayi-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Priority Badge */
.priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}

.priority-low { background-color: #28a745; }
.priority-medium { background-color: #ffc107; color: #333; }
.priority-high { background-color: #fd7e14; }
.priority-urgent { background-color: #dc3545; }

/* File Upload Areas */
.altalayi-file-upload {
    border: 2px dashed #bdc3c7;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.3s;
}

.altalayi-file-upload:hover {
    border-color: #3498db;
}

.altalayi-file-upload.dragover {
    border-color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
}

.altalayi-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 15px;
}

.upload-text {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 5px;
}

.upload-hint {
    color: #7f8c8d;
    font-size: 14px;
}

/* File Preview */
.file-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.file-preview-item {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    position: relative;
}

.file-preview-item img {
    max-width: 100%;
    max-height: 80px;
    border-radius: 4px;
    object-fit: cover;
}

.file-preview-item .file-icon {
    font-size: 32px;
    color: #3498db;
    margin-bottom: 5px;
}

.file-preview-item .file-name {
    font-size: 12px;
    margin-top: 5px;
    word-break: break-all;
    color: #34495e;
}

.file-preview-item .file-size {
    font-size: 10px;
    color: #7f8c8d;
    margin-top: 2px;
}

.file-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove-btn:hover {
    background: #c0392b;
}

/* Loading States */
.altalayi-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: altalayi-spin 1s linear infinite;
}

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

/* Messages */
.altalayi-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.altalayi-message-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.altalayi-message-content {
    flex: 1;
}

.altalayi-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.altalayi-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.altalayi-message.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.altalayi-message.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Forms */
.altalayi-form-group {
    margin-bottom: 20px;
}

.altalayi-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.altalayi-form-label.required::after {
    content: ' *';
    color: #e74c3c;
}

.altalayi-form-input,
.altalayi-form-textarea,
.altalayi-form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: white;
}

.altalayi-form-input:focus,
.altalayi-form-textarea:focus,
.altalayi-form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.altalayi-form-hint {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 14px;
}

.altalayi-form-error {
    display: block;
    margin-top: 5px;
    color: #e74c3c;
    font-size: 14px;
}

/* Buttons */
.altalayi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

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

.altalayi-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.altalayi-btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.altalayi-btn-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.altalayi-btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.altalayi-btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.altalayi-btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.altalayi-btn-outline:hover {
    background: #3498db;
    color: white;
}

.altalayi-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.altalayi-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Tables */
.altalayi-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.altalayi-table th,
.altalayi-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.altalayi-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.altalayi-table tr:hover {
    background: #f8f9fa;
}

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

/* Cards */
.altalayi-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.altalayi-card-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.altalayi-card-title {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.altalayi-card-body {
    padding: 20px;
}

.altalayi-card-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

/* Progress Bars */
.altalayi-progress {
    width: 100%;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
}

.altalayi-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .altalayi-btn {
        width: 100%;
        justify-content: center;
    }
    
    .file-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .altalayi-table {
        font-size: 14px;
    }
    
    .altalayi-table th,
    .altalayi-table td {
        padding: 8px;
    }
}
