/* tumitate.css - Scope all styles under .tumitate-app */

.tumitate-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    max-width: 900px;
    margin: 10px auto 30px auto;
    padding: 0 10px;
}

.tumitate-app * {
    box-sizing: border-box;
}

/* Header Banner */
.tumitate-app .tm-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
    margin-bottom: 24px;
}

.tumitate-app .tm-header-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.tumitate-app .tm-header-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 6px 0 0 0;
    line-height: 1.4;
}

/* Form Card Style */
.tumitate-app .tm-form-card {
    max-width: 600px;
    margin: 0 auto 24px auto;
}

/* Info Card Styles */
.tumitate-app .tm-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.tumitate-app .tm-info-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 16px 0;
}

.tumitate-app .tm-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.tumitate-app .tm-link-list li {
    margin: 0;
}

.tumitate-app .tm-link-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    text-align: center;
    height: 100%;
}

.tumitate-app .tm-link-list a:hover {
    border-color: #10b981;
    color: #059669;
    background: #f0fdf4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

/* Card Style */
.tumitate-app .tm-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
}

/* Form Styles */
.tumitate-app .tm-form-group {
    margin-bottom: 18px;
}

.tumitate-app .tm-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.tumitate-app .tm-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tumitate-app .tm-input {
    width: 100%;
    padding: 12px 60px 12px 14px;
    font-size: 1.05rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    background-color: #ffffff;
    font-weight: 500;
}

.tumitate-app .tm-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.tumitate-app .tm-unit {
    position: absolute;
    right: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    pointer-events: none;
}

/* Button Styles */
.tumitate-app .tm-action {
    margin-top: 8px;
}

.tumitate-app .tm-btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tumitate-app .tm-btn-primary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.tumitate-app .tm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.tumitate-app .tm-btn-primary:active {
    transform: translateY(1px);
}

/* Result Area */
.tumitate-app .tm-result-area {
    margin-top: 10px;
}

/* Summary Card */
.tumitate-app .tm-summary-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.tumitate-app .tm-summary-icon {
    font-size: 2rem;
}

.tumitate-app .tm-summary-content {
    display: flex;
    flex-direction: column;
}

.tumitate-app .tm-summary-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #047857;
    margin-bottom: 4px;
}

.tumitate-app .tm-summary-text {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0;
}

.tumitate-app .tm-summary-text strong {
    font-size: 1.4rem;
    color: #059669;
    font-weight: 800;
}

/* Results Tables Card */
.tumitate-app .tm-table-card {
    margin-bottom: 20px;
}

.tumitate-app .tm-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tumitate-app .tm-table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.tumitate-app .tm-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.925rem;
}

.tumitate-app .tm-table th {
    background-color: #f9fafb;
    color: #4b5563;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 2px solid #e5e7eb;
}

.tumitate-app .tm-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.tumitate-app .tm-table tr:last-child td {
    border-bottom: none;
}

.tumitate-app .tm-table tr:nth-child(even) {
    background-color: #f9fafb;
}

.tumitate-app .tm-table tr:hover {
    background-color: #f3f4f6;
}

.tumitate-app .tm-table .tm-td-highlight {
    font-weight: 700;
    color: #059669;
}

/* Details Accordion Styles */
.tumitate-app .tm-details {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    transition: border-color 0.2s;
}

.tumitate-app .tm-details:hover {
    border-color: #cbd5e1;
}

.tumitate-app .tm-details[open] {
    border-color: #10b981;
}

.tumitate-app .tm-summary-header {
    padding: 14px 20px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    background-color: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; /* Hide default triangle */
}

/* Hide webkit details marker */
.tumitate-app .tm-summary-header::-webkit-details-marker {
    display: none;
}

.tumitate-app .tm-details[open] .tm-summary-header {
    background-color: #f0fdf4;
    color: #15803d;
    border-bottom: 1px solid #e5e7eb;
}

.tumitate-app .tm-summary-header-icon {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    color: #9ca3af;
}

.tumitate-app .tm-details[open] .tm-summary-header-icon {
    transform: rotate(180deg);
    color: #15803d;
}

.tumitate-app .tm-details-content {
    padding: 16px 20px;
    background-color: #ffffff;
    max-height: 400px;
    overflow-y: auto;
}

/* Monthly items styling */
.tumitate-app .tm-monthly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
}

.tumitate-app .tm-monthly-item {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
}

.tumitate-app .tm-monthly-item span:first-child {
    color: #6b7280;
}

.tumitate-app .tm-monthly-item span:last-child {
    font-weight: 600;
    color: #1f2937;
}

.tumitate-app .tm-monthly-item.tm-month-year-start {
    background-color: #ecfdf5;
    border-color: #d1fae5;
}

.tumitate-app .tm-monthly-item.tm-month-year-start span:first-child {
    color: #047857;
    font-weight: 700;
}

.tumitate-app .tm-monthly-item.tm-month-year-start span:last-child {
    color: #047857;
}
