
/**
 * File: assets/css/public.css
 * Public-facing styles
 */

/* Login Styles */
.ta-login-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
}

.ta-login-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ta-login-box h2 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
}

.ta-login-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.ta-code-sent-message {
    background: #e7f3ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: #0073aa;
}

.ta-login-success {
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

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

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

.ta-form-group input,
.ta-form-group select,
.ta-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.ta-form-group input:focus,
.ta-form-group select:focus,
.ta-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.ta-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* Button Styles */
.ta-button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ta-button-primary {
    background: #0073aa;
    color: #fff;
}

.ta-button-primary:hover {
    background: #005a87;
}

.ta-button-secondary {
    background: #f1f1f1;
    color: #333;
}

.ta-button-secondary:hover {
    background: #e0e0e0;
}

.ta-button-danger {
    background: #dc3545;
    color: #fff;
}

.ta-button-danger:hover {
    background: #c82333;
}

.ta-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ta-button-loader {
    display: inline-block;
}

.ta-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ta-spin 0.6s linear infinite;
}

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

/* Message Styles */
.ta-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
}

.ta-message p {
    margin: 0;
}

.ta-message-success {
    background: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

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

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

.ta-message-info {
    background: #d1ecf1;
    border: 1px solid #17a2b8;
    color: #0c5460;
}

/* Overview Styles */
.ta-overview-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ta-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.ta-welcome h2 {
    margin: 0 0 5px 0;
    color: #333;
}

.ta-company {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Filters */
.ta-filters {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.ta-filters h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

#ta-filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.ta-filter-group {
    flex: 1;
    min-width: 200px;
}

/* Training Grid */
.ta-trainings-section h3 {
    margin-bottom: 20px;
}

.ta-trainings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.ta-training-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s;
}

.ta-training-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ta-training-card.ta-registered {
    border-color: #28a745;
    background: #f8fff9;
}

.ta-training-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ta-training-header h4 {
    margin: 0;
    flex: 1;
    color: #333;
}

.ta-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ta-badge-success {
    background: #d4edda;
    color: #155724;
}

.ta-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.ta-training-details {
    margin-bottom: 15px;
}

.ta-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #555;
}

.ta-icon {
    font-size: 18px;
}

.ta-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.ta-category-tag {
    background: #e7f3ff;
    color: #0073aa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.ta-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.ta-training-actions {
    margin-top: 15px;
}

.ta-training-actions .ta-button {
    width: 100%;
}

/* Modal Styles */
.ta-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ta-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.ta-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.ta-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.ta-modal-header h3 {
    margin: 0;
}

.ta-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ta-modal-close:hover {
    color: #333;
}

.ta-modal-body {
    padding: 20px;
}

.ta-modal-training-name {
    font-weight: 600;
    margin-bottom: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Custom Fields */
.ta-custom-field {
    margin-bottom: 20px;
}

.ta-custom-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.ta-custom-field label .required {
    color: #d63638;
    margin-left: 3px;
}

.ta-custom-field input[type="text"],
.ta-custom-field input[type="email"],
.ta-custom-field input[type="number"],
.ta-custom-field input[type="date"],
.ta-custom-field textarea,
.ta-custom-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.ta-custom-field input:focus,
.ta-custom-field textarea:focus,
.ta-custom-field select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.ta-custom-field textarea {
    resize: vertical;
    min-height: 100px;
}

.ta-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ta-radio-label {
    display: flex;
    align-items: center;
    font-weight: normal !important;
    cursor: pointer;
}

.ta-radio-label input[type="radio"] {
    margin-right: 8px;
    width: auto;
}

.ta-custom-field-checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .ta-trainings-grid {
        grid-template-columns: 1fr;
    }

    .ta-overview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    #ta-filter-form {
        flex-direction: column;
    }

    .ta-filter-group {
        width: 100%;
    }
}