/* ===== COMPONENTS.CSS - CSS สำหรับ Components ===== */
/* Forms, Buttons, Cards, Charts */

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
    background: white;
}

.opinion-textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 15px;
    font-family: inherit;
}

.opinion-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

/* Search Components */
.search-container {
    position: relative;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #ecf0f1;
    border-radius: 50px;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.9);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 1.2rem;
}

/* Filter Options */
.filter-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #ecf0f1;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border-color: transparent;
}

/* Buttons */
.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #bdc3c7;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 8px 25px rgba(52,152,219,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(52,152,219,0.4);
}

.btn-success {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 8px 25px rgba(39,174,96,0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(39,174,96,0.4);
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

/* GI Cards */
.gi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gi-card {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.gi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.gi-card.selected {
    border-color: #e74c3c;
    background: linear-gradient(45deg, rgba(231,76,60,0.05), rgba(192,57,43,0.05));
}

.gi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.gi-number {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.gi-country {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

.gi-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.gi-product {
    color: #27ae60;
    font-weight: 600;
    margin-bottom: 15px;
}

.gi-checkbox {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

/* Selected GI Items */
.selected-gi-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 2px solid #e74c3c;
}

.selected-gi-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
}

.selected-gi-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.selected-gi-details {
    display: flex;
    gap: 20px;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.selected-count {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    display: inline-block;
}

/* File Upload Components */
.file-upload-container {
    position: relative;
    margin-bottom: 15px;
}

.file-upload {
    display: none;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.file-upload-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243,156,18,0.3);
}

.file-list {
    margin-top: 15px;
    display: none;
}

.file-list.has-files {
    display: block;
}

.file-item {
    background: rgba(52,152,219,0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
}

.file-size {
    font-size: 0.9em;
    color: #666;
}

.remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Dashboard Components */
.dashboard {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(52,152,219,0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.chart-container {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

/* Summary Section */
.summary-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
}

.summary-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.summary-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.summary-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.summary-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}