/* Google Fonts for a modern look */
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;600;700&display=swap');

.ty-voting-container {
    font-family: 'Pretendard', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    color: #2c3e50;
    line-height: 1.6;
}

/* Hero Section */
.ty-hero-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.ty-hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ty-hero-section p {
    font-size: 1.2rem;
    color: #555;
}

/* Award Section */
.ty-award-section {
    margin-bottom: 4rem;
}

.ty-award-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.ty-award-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.ty-award-card {
    position: relative;
    border-radius: 20px;
    height: 380px;
    width: 280px; /* Default width */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff; /* Card base color */
}

.ty-award-card-bg {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    /* Will be styled via inline CSS for background-image or mask-image */
}

.ty-award-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.ty-award-content {
    padding: 2rem 1.5rem;
    border-radius: 15px;
    width: 80%;
    /* removed blur to meet user request */
}

.ty-award-department {
    font-size: 1rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* The name styles will be overridden by inline CSS based on Admin Settings */
.ty-award-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

.ty-award-message {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Voting Form Section */
.ty-form-section {
    background: #ffffff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.ty-form-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.ty-form-group {
    margin-bottom: 1.5rem;
}

.ty-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.ty-form-group input, 
.ty-form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.ty-form-group input:focus, 
.ty-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ty-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.ty-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.3);
}

.ty-submit-btn:active {
    transform: translateY(0);
}

/* Loading Spinner */
.ty-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

#ty-form-response {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    min-height: 24px; /* prevents layout shift */
}

/* Animations */
.ty-fade-in {
    animation: fadeIn 0.5s ease;
}

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

@media (max-width: 768px) {
    .ty-voting-container {
        padding: 1rem;
    }
    .ty-form-section {
        padding: 2rem 1.5rem;
    }
}

/* Cursor pointer for clickable elements */
.ty-cursor-pointer {
    cursor: pointer;
}

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

.ty-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.ty-modal-content-box {
    position: relative;
    background-color: #ffffff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease forwards;
    overflow: hidden;
}

.ty-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s;
}

.ty-modal-close:hover {
    color: #000;
}

#ty-modal-body {
    padding: 30px;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

#ty-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

#ty-modal-body h1, #ty-modal-body h2, #ty-modal-body h3 {
    margin-top: 0;
    color: #1a202c;
    font-size: 1.5rem;
}
