/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
}

/* Header Styles */
.header-logo {
    transition: transform 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-logo:hover {
    transform: scale(1.05);
}

/* Footer styles */
.footer-logo {
    transition: transform 0.3s ease;
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    margin: 0 10px;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-logo:hover {
    transform: scale(1.1);
}

/* Brace Examples Gallery */
.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.02);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #343a40;
}

/* Card Styles */
.card {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Button Styles */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
}

/* Results Panel Styles */
#resultsPanel {
    border: 2px solid #198754;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    margin-bottom: 30px;
}

#resultsPanel .card-header {
    border-bottom: 2px solid #198754;
}

#partCode {
    font-size: 1.1rem;
    font-weight: bold;
    color: #dc3545;
    background-color: #f8f9fa;
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* Brace Position Diagram */
.position-diagram {
    background-color: #f1f1f1;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    min-height: 80px;
    position: relative;
    margin-top: 10px;
}

.brace-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #0d6efd;
    border-radius: 50%;
    transform: translateY(-50%);
}

.joist-line {
    position: absolute;
    height: 4px;
    background-color: #6c757d;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
}

/* Warning and Information Styles */
.warning-item {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 8px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
}

.info-item {
    background-color: #cfe2ff;
    border-left: 4px solid #0d6efd;
    padding: 8px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
}

/* Special styling for Retro braces */
.retro-notice {
    background-color: #d1e7dd;
    border-left: 4px solid #198754;
    padding: 8px 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-weight: 500;
}

/* Brace Type Indicator */
.brace-type-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
    font-weight: bold;
    color: white;
}

.brace-type-indicator.boomerang {
    background-color: #0d6efd;
}

.brace-type-indicator.flatbrace {
    background-color: #6f42c1;
}

.brace-type-indicator.retro {
    background-color: #198754;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Input validation styles */
.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback,
.is-invalid ~ .invalid-feedback {
    display: block;
}
