/* TBC Members Registration Form Styles */

/* Container and Layout */
.tbc-registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.tbc-registration-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tbc-registration-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.tbc-registration-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
    color: white;
}

/* Form Styling */
.tbc-registration-form {
    background: #ffffff;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Form Sections */
.tbc-form-section {
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
    background: #ffffff;
}

.tbc-form-section:last-of-type {
    border-bottom: none;
}

.tbc-form-section:nth-child(even) {
    background: #f8f9fa;
}

.tbc-form-section h3 {
    margin: 0 0 25px 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
}

/* Form Rows and Groups */
.tbc-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.tbc-form-row:last-child {
    margin-bottom: 0;
}

.tbc-form-group {
    display: flex;
    flex-direction: column;
}

.tbc-form-group-full {
    flex: 1;
}

.tbc-form-group-half {
    flex: 0 0 calc(50% - 10px);
}

.tbc-form-group-third {
    flex: 0 0 calc(33.333% - 14px);
}

/* Labels */
.tbc-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

/* Form Controls */
.tbc-form-group input,
.tbc-form-group textarea,
.tbc-form-group select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.tbc-form-group input:focus,
.tbc-form-group textarea:focus,
.tbc-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.tbc-form-group input::placeholder,
.tbc-form-group textarea::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* Select placeholder styling */
.tbc-form-group select option[value=""] {
    color: #95a5a6;
    font-style: italic;
}

.tbc-form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Required Field Indicator */
.tbc-form-group label:has(+ input[required])::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Icons */
.tbc-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
    flex-shrink: 0;
}

.tbc-icon-large {
    width: 48px;
    height: 48px;
}

/* Icon SVG Definitions using CSS pseudo-elements */
.tbc-icon::before {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
}

.tbc-icon-large::before {
    width: 48px;
    height: 48px;
    background-size: 48px 48px;
}

/* User Plus Icon */
.tbc-icon-user-plus::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 9v6M23 12h-6'/%3E%3C/svg%3E");
}

/* Key Icon */
.tbc-icon-key::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23e74c3c'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z'/%3E%3C/svg%3E");
}

/* Mail Icon */
.tbc-icon-mail::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z'/%3E%3C/svg%3E");
}

/* Lock Icon */
.tbc-icon-lock::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a1 1 0 001-1v-6a1 1 0 00-1-1H6a1 1 0 00-1 1v6a1 1 0 001 1zM12 9V7a3 3 0 00-6 0v2'/%3E%3C/svg%3E");
}

/* User Icon */
.tbc-icon-user::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E");
}

/* Users Icon */
.tbc-icon-users::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a4 4 0 11-8 0 4 4 0 018 0z'/%3E%3C/svg%3E");
}

/* Phone Icon */
.tbc-icon-phone::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z'/%3E%3C/svg%3E");
}

/* Map Pin Icon */
.tbc-icon-map-pin::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 11a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3C/svg%3E");
}

/* Home Icon */
.tbc-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'/%3E%3C/svg%3E");
}

/* Flag Icon */
.tbc-icon-flag::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 2h7a2 2 0 012 2v6a2 2 0 01-2 2h-7l-1-2H5a2 2 0 00-2 2z'/%3E%3C/svg%3E");
}

/* Navigation Icon */
.tbc-icon-navigation::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 19l9 2-9-18-9 18 9-2zm0 0v-8'/%3E%3C/svg%3E");
}

/* Edit Icon */
.tbc-icon-edit::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/%3E%3C/svg%3E");
}

/* Message Circle Icon */
.tbc-icon-message-circle::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z'/%3E%3C/svg%3E");
}

/* Check Icon */
.tbc-icon-check::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

/* Refresh Icon */
.tbc-icon-refresh::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667eea'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'/%3E%3C/svg%3E");
}

/* Calendar Icon */
.tbc-icon-calendar::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334495e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
}

/* Form Actions */
.tbc-form-actions {
    padding: 30px;
    background: #f8f9fa;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* Button Styles */
.tbc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tbc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tbc-btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tbc-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.tbc-btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Messages */
.tbc-messages {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.tbc-messages.tbc-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    display: block;
}

.tbc-messages.tbc-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tbc-registration-container {
        padding: 10px;
    }
    
    .tbc-registration-header {
        padding: 20px;
    }
    
    .tbc-registration-header h2 {
        font-size: 1.8em;
    }
    
    .tbc-form-section {
        padding: 20px;
    }
    
    .tbc-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .tbc-form-group-half,
    .tbc-form-group-third {
        flex: 1;
    }
    
    .tbc-form-actions {
        flex-direction: column;
        padding: 20px;
    }
    
    .tbc-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tbc-registration-header h2 {
        font-size: 1.5em;
    }
    
    .tbc-form-section h3 {
        font-size: 1.2em;
    }
    
    .tbc-form-group input,
    .tbc-form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading State */
.tbc-registration-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.tbc-registration-form.loading .tbc-btn-primary::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Message Styles */
.tbc-messages {
    margin-bottom: 20px;
}

.tbc-success {
    background: #d1edff;
    border: 2px solid #0984e3;
    color: #0984e3;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

.tbc-error {
    background: #ffe0e0;
    border: 2px solid #e74c3c;
    color: #c0392b;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

.tbc-info {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

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

/* Accessibility Improvements */
.tbc-form-group input:focus,
.tbc-form-group textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .tbc-registration-header {
        background: #000;
        color: #fff;
    }
    
    .tbc-form-group input,
    .tbc-form-group textarea {
        border-color: #000;
    }
    
    .tbc-btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
}
