/* Enhanced UI Variables */
:root {
    --primary-color: #fe7743;
    --primary-hover: #e55a2b;
    --secondary-color: #10B981;
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-light: #6B7280;
    --background-light: #F9FAFB;
    --background-white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-max-width: 800px;
    --container-padding: 1.5rem;
    --card-spacing: 1.25rem;
    --card-border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Global Styles */
.tdbv-single-breed-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
    font-family: var(--font-inter);
        background: var(--background-light);
    min-height: 100vh;
}

.tdbv-breed-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.tdbv-single-breed {
    display: flex;
    flex-direction: column;
    gap: var(--card-spacing);
}

/* Model Viewer Section */
.tdbv-model-container {
    position: relative;
    width: 100%;
        height: 400px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.tdbv-model-container model-viewer {
    width: 100%;
    height: 100%;
    background: #ffffff;
    --poster-color: transparent;
    --progress-bar-height: 4px;
    --progress-bar-color: #fe7743;
    --progress-mask: #ffffff;
}

/* Content Cards */
.tdbv-breed-content {
    display: flex;
    flex-direction: column;
    gap: var(--card-spacing);
}

/* About Section */
    .tdbv-breed-info {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    }

.tdbv-breed-info-header {
    background: var(--primary-color);
    padding: 1.25rem 1.5rem;
    border-bottom: none;
    }

.tdbv-breed-info-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: left;
    }

.tdbv-breed-info-content {
    padding: 1.5rem;
    }

.tdbv-breed-description {
    color: #111827;
        line-height: 1.6;
    font-size: 1.125rem;
    margin: 0;
    font-weight: 400;
    }

.tdbv-breed-sound {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.tdbv-breed-sound h3,
.tdbv-breed-sound h4 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-color);
    color: #ffffff;
    padding: 1rem 1.25rem;
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Details Section */
.tdbv-details {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-top: 1.5rem;
    }

.tdbv-details-header {
    background: var(--primary-color);
    padding: 1.25rem 1.5rem;
    margin: -2rem -2rem 2rem -2rem;
    }

.tdbv-details-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
    }

.tdbv-details-content {
    padding: 0;
    display: block !important;
    visibility: visible !important;
}

.tdbv-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

.tdbv-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.detail-value {
    font-size: 1.125rem;
    color: #111827;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Loading States */
.tdbv-model-progress,
.tdbv-model-error,
.tdbv-loading-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--background-white);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.tdbv-ar-button {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tdbv-ar-button:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.tdbv-no-model {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Audio Player */
.tdbv-breed-sound {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    margin-top: 1.5rem;
    display: block !important;
    visibility: visible !important;
}

.tdbv-breed-sound h3,
.tdbv-breed-sound h4 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-color);
    color: #ffffff;
    padding: 1rem;
    margin: -1rem -1rem 0.75rem -1rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.tdbv-audio-player {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tdbv-audio-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.tdbv-audio-play {
    background: #fef5f2;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.tdbv-audio-play:hover {
    background: var(--primary-color);
    color: white;
}

.tdbv-audio-progress {
    flex-grow: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.tdbv-audio-progress .progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.1s linear;
}

.tdbv-audio-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: right;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .tdbv-single-breed-container {
        padding: 0;
        max-width: none;
    }

    .tdbv-breed-info {
        margin: 1rem 0;
        max-width: 100%;
        width: 100%;
        background: var(--primary-color);
        border-radius: var(--radius-lg);
    }

    .tdbv-breed-info-header {
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    .tdbv-breed-info-header h3 {
        color: #ffffff;
    }

    .tdbv-breed-description {
        color: #000000;
    }

    .tdbv-breed-info-content {
        background: #ffffff;
    }

    .tdbv-model-container {
        height: 350px;
        margin: 1rem;
    }

    .tdbv-breed-sound {
        width: 100%;
        max-width: 100%;
        margin-top: 1rem;
        background: #ffffff;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .tdbv-breed-sound h3,
    .tdbv-breed-sound h4 {
        font-size: 1.5rem;
        font-weight: 700;
        background: var(--primary-color);
        color: #ffffff;
        padding: 1rem 1rem;
        margin: -1rem -1rem 1rem -1rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .tdbv-details {
        padding: 1.5rem;
        background: #ffffff;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .tdbv-details-header {
        background: var(--primary-color);
        padding: 1rem 1.5rem;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    }

    .tdbv-details-header h3 {
        color: #ffffff;
        border-bottom: none;
    }

    .tdbv-detail-item {
        background: #ffffff;
        border-color: #e5e7eb;
    }

    .detail-label {
        color: #4b5563;
    }

    .detail-value {
        color: #111827;
    }

    .tdbv-details-grid {
        gap: 1.5rem;
}

    .tdbv-detail-item {
        padding: 0.875rem;
}

    .detail-value {
        font-size: 1rem;
}

    .tdbv-breed-info-header {
        padding: 1rem 1.25rem;
}

    .tdbv-breed-info-header h3 {
        font-size: 1.5rem;
        line-height: 1.25;
        text-align: left;
    }

    .tdbv-breed-info-content {
        padding: 1.25rem;
        background: #ffffff;
    }

    .tdbv-breed-description {
        font-size: 1rem;
        color: #000000;
    }

    .tdbv-breed-sound {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        background: #ffffff;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .tdbv-breed-sound h3,
    .tdbv-breed-sound h4 {
        font-size: 1.375rem;
        font-weight: 700;
        background: var(--primary-color);
        color: #ffffff;
        padding: 1rem;
        margin: -1rem -1rem 1rem -1rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

@media screen and (max-width: 480px) {
    .tdbv-single-breed-container {
        padding: 0;
        max-width: none;
    }

    .tdbv-breed-info {
        margin: 1rem 0;
        max-width: 100%;
        width: 100%;
        background: var(--primary-color);
        border-radius: var(--radius-lg);
    }

    .tdbv-breed-info-header {
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    .tdbv-breed-info-header h3 {
        color: #ffffff;
    }

    .tdbv-breed-description {
        color: #000000;
    }

    .tdbv-breed-sound {
        padding: 0.75rem;
}

    .tdbv-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
}

    .tdbv-details {
        background: #ffffff;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .tdbv-details-header {
        background: var(--primary-color);
        padding: 1rem 1.5rem;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    }

    .tdbv-details-header h3 {
        color: #ffffff;
        border-bottom: none;
    }

    .tdbv-detail-item {
        background: #ffffff;
        border-color: #e5e7eb;
    }

    .detail-label {
        color: #4b5563;
    }

    .detail-value {
        color: #111827;
    }

    .tdbv-breed-info-header {
        padding: 0.875rem 1rem;
    }

    .tdbv-breed-info-header h3 {
        font-size: 1.25rem;
        line-height: 1.2;
        word-break: break-word;
        text-align: left;
    }

    .tdbv-breed-info-content {
        padding: 1rem;
        background: #ffffff;
    }

    .tdbv-breed-sound {
        width: 100%;
        max-width: 100%;
        padding: 0.875rem;
        margin-top: 1.25rem;
        background: #ffffff;
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .tdbv-breed-sound h3,
    .tdbv-breed-sound h4 {
        font-size: 1.25rem;
        font-weight: 700;
        background: var(--primary-color);
        color: #ffffff;
        padding: 0.875rem;
        margin: -0.875rem -0.875rem 1rem -0.875rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .tdbv-ar-button {
        bottom: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Extra small screens */
@media screen and (max-width: 320px) {
    .tdbv-single-breed-container {
        max-width: none;
    }

    .tdbv-breed-info {
        margin: 1rem 0;
        max-width: 100%;
        width: 100%;
        background: var(--primary-color);
        border-radius: var(--radius-lg);
    }

    .tdbv-breed-info-header {
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    .tdbv-breed-info-header h3 {
        color: #ffffff;
    }

    .tdbv-breed-description {
        color: #000000;
    }

    .tdbv-breed-info-header {
        padding: 0.75rem 0.875rem;
    }

    .tdbv-breed-info-header h3 {
        font-size: 1.125rem;
        line-height: 1.15;
        word-break: break-word;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .tdbv-breed-info-content {
        padding: 0.875rem;
        background: #ffffff;
    }
}

/* Main Color Theme - Orange headings with white backgrounds */
.tdbv-details {
    background: #ffffff;
}

.tdbv-details-header {
    background: var(--primary-color);
    padding: 1.25rem 1.5rem;
    margin: -2rem -2rem 2rem -2rem;
}

.tdbv-details-header h3 {
    color: #ffffff;
    border-bottom: none;
}

.tdbv-detail-item {
    background: #ffffff;
    border-color: #e5e7eb;
}

.detail-label {
    color: #4b5563;
}

.detail-value {
    color: #111827;
}

.tdbv-breed-sound {
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tdbv-breed-sound h3,
.tdbv-breed-sound h4 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    background: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 1rem 1.25rem;
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.tdbv-breed-sound .tdbv-audio-player {
    background: transparent !important;
    border: none;
}

.tdbv-breed-sound .tdbv-audio-controls {
    background: transparent !important;
}

.tdbv-breed-sound .tdbv-audio-progress {
    background: rgba(0, 0, 0, 0.1) !important;
}

.tdbv-breed-sound .tdbv-audio-time {
    color: var(--text-secondary) !important;
}

/* Carousel Styles */
.tdbv-carousel-container {
    position: relative;
    margin: 2rem 0;
    padding: 0 40px;
    background: var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tdbv-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    padding: 1.5rem 0;
}

.tdbv-carousel::-webkit-scrollbar {
    display: none;
}

.tdbv-breed-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    background: var(--background-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tdbv-breed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tdbv-card-model {
    position: relative;
    height: 300px;
    background: #ffffff;
    overflow: hidden;
}

.tdbv-card-content {
    padding: 1.5rem;
}

.tdbv-card-title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tdbv-card-description {
    margin: 0 0 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.tdbv-read-more {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: #fe7743;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
}

.tdbv-read-more:hover {
    background: #e55a2b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.tdbv-carousel-prev,
.tdbv-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #374151;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.tdbv-carousel-prev {
    left: 10px;
}

.tdbv-carousel-next {
    right: 10px;
}

.tdbv-carousel-prev:hover,
.tdbv-carousel-next:hover {
    background: #4b5563;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tdbv-carousel-prev.disabled,
.tdbv-carousel-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.tdbv-carousel-prev .dashicons,
.tdbv-carousel-next .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #ffffff;
}

.tdbv-model-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #ffffff;
    color: #ef4444;
    text-align: center;
    padding: 20px;
}

.tdbv-model-error .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
}

.tdbv-model-error p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333333;
}

/* Loading Animation */
@keyframes modelLoading {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.model-loaded model-viewer {
    animation: modelLoading 0.3s ease-out forwards;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    position: absolute;
    bottom: 0;
    left: 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.progress-bar.hide {
        opacity: 0;
}

.update-bar {
    width: 0%;
    height: 100%;
    background: #fe7743;
    transition: width 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .tdbv-carousel-container {
        padding: 0 30px;
}

    .tdbv-breed-card {
        flex: 0 0 260px;
}

    .tdbv-card-model {
        height: 250px;
}

    .tdbv-card-title {
    font-size: 1.25rem;
}
}

@media (max-width: 480px) {
    .tdbv-carousel-container {
        padding: 0 20px;
        margin: 1rem 0;
    }

    .tdbv-breed-card {
        flex: 0 0 220px;
    }

    .tdbv-card-model {
        height: 200px;
    }

    .tdbv-card-title {
        font-size: 1.125rem;
    }

    .tdbv-read-more {
        padding: 0.625rem;
    font-size: 0.875rem;
    }
}

/* Model Viewer Styles */
model-viewer {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    --poster-color: transparent;
    --progress-bar-height: 4px;
    --progress-bar-color: #fe7743;
    --progress-mask: #ffffff;
}

/* Carousel Model Viewer */
.tdbv-card-model {
    position: relative;
    height: 300px;
    background: #ffffff;
    overflow: hidden;
}

.tdbv-card-model model-viewer {
    width: 100%;
    height: 100%;
    background: #ffffff;
    --poster-color: transparent;
    --progress-bar-height: 4px;
    --progress-bar-color: #fe7743;
    --progress-mask: #ffffff;
}

/* Error State */
.tdbv-model-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #ffffff;
    color: #ef4444;
    text-align: center;
    padding: 20px;
}

.tdbv-model-error p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333333;
} 