/* ===== 3. relationship.css - RELATIONSHIP TAB ===== */

/* ===== RELATIONSHIP LAYOUT ===== */
.relationship-steps {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.relationship-header {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    flex-direction: column;
    text-align: center;
    gap: 20px;
}

.relationship-goals {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.goal-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.goal-icon {
    font-size: 1.2rem;
}

/* ===== GUIDANCE SECTION ===== */
.guidance-section {
    background: linear-gradient(135deg, #fef7cd, #fbbf24) !important;
    border: 2px solid #f59e0b !important;
}

.guidance-header {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white;
    padding: 20px 30px;
}

.guidance-content {
    padding: 30px;
}

.guidance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.guidance-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #fbbf24;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease forwards;
}

.guidance-item:hover {
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2);
}

.guidance-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.guidance-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guidance-title h3 {
    margin: 0;
    color: #92400e;
    font-size: 1.1rem;
    font-weight: 600;
}

.guidance-description {
    color: #451a03;
    line-height: 1.6;
    font-size: 0.95rem;
}

.guidance-description strong {
    color: #92400e;
    font-weight: 600;
}

/* ===== RELATIONSHIP TABLE ===== */
.relationship-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    max-width: 100%;
}

.relationship-header-row {
    display: grid;
    grid-template-columns: 50px 180px 140px 1fr 1fr 1fr 100px;
    gap: 1px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
}

.relationship-header-row > div {
    padding: 12px 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.relationship-items {
    max-height: 600px;
    overflow-y: auto;
}

.relationship-item {
    display: grid;
    grid-template-columns: 50px 180px 140px 1fr 1fr 1fr 100px;
    gap: 1px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.relationship-item:hover {
    background: #e3f2fd;
}

.relationship-item > div {
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    font-size: 0.9rem;
}

.col-stt {
    font-weight: 600;
    color: #6c757d;
}

/* Name Column */
.col-name {
    position: relative;
    padding: 8px !important;
}

.col-name input {
    width: 100%;
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
}

.col-name input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff4757;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

/* Importance Select */
.importance-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    background: white;
}

.importance-select:focus {
    outline: none;
    border-color: #667eea;
}

/* ===== CHECKBOXES ===== */
.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-checkbox:hover .checkmark {
    background: #e2e8f0;
}

.custom-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-color: #22c55e;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===== SCORE DISPLAY ===== */
.person-score {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    min-width: 35px;
    text-align: center;
}

.score-excellent {
    background: #dcfce7;
    color: #166534;
}

.score-good {
    background: #dbeafe;
    color: #1e40af;
}

.score-average {
    background: #fef3c7;
    color: #92400e;
}

.score-poor {
    background: #fee2e2;
    color: #dc2626;
}

/* ===== TOOLTIPS ===== */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 12px;
    cursor: help;
    color: white;
    font-weight: bold;
}

.tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    transition: all 0.3s ease;
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* ===== ADD PERSON SECTION ===== */
.add-person-section {
    padding: 20px;
    text-align: center;
    background: #f8f9ff;
    border-top: 1px solid #e5e7eb;
}

.add-person-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.add-person-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

/* ===== RELATIONSHIP RESULTS ===== */
.relationship-result-main {
    background: linear-gradient(135deg, #f093fb, #f5576c) !important;
}

.result-sublabel {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
    font-style: italic;
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guidance-item:nth-child(1) { animation-delay: 0.1s; }
.guidance-item:nth-child(2) { animation-delay: 0.2s; }
.guidance-item:nth-child(3) { animation-delay: 0.3s; }
.guidance-item:nth-child(4) { animation-delay: 0.4s; }
.guidance-item:nth-child(5) { animation-delay: 0.5s; }
.guidance-item:nth-child(6) { animation-delay: 0.6s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .relationship-steps {
        max-width: 100%;
        padding: 20px;
    }
    
    .relationship-header-row,
    .relationship-item {
        grid-template-columns: 40px 140px 120px 80px 80px 80px 80px;
        font-size: 0.8rem;
    }
    
    .relationship-header-row > div,
    .relationship-item > div {
        padding: 8px 4px;
    }
}

@media (max-width: 768px) {
    .guidance-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .guidance-content {
        padding: 20px;
    }
    
    .guidance-item {
        padding: 15px;
    }
    
    .guidance-title {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .guidance-icon {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .tooltip-content {
        white-space: normal;
        width: 200px;
        text-align: center;
    }

    .relationship-header-row,
    .relationship-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .relationship-header-row > div:not(:first-child),
    .relationship-item > div:not(:first-child) {
        border-top: 1px solid #e5e7eb;
    }
}