/* Main container for each cookie group */
.cookie-group {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem; /* Bootstrap's default border-radius */
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Title section layout */
.cookie-group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.cookie-group-title h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.cookie-group-text{
    font-size: 1rem;
}

/* Container for the accept/decline buttons/status */
.cookie-group-form {
    display: flex;
    gap: 0.5rem; /* Space between buttons */
}

/* Common style for form buttons */
.cookie-group-form input[type="submit"] {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: bold;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    min-width: 80px; /* Give buttons a consistent width */
    text-align: center;
    border: 1px solid transparent; /* Add border for consistent layout and size */
}

/* Accept button style (Primary Action) */
.cookie-consent-accept input[type="submit"] {
    background-color: #28a745; /* Green */
    color: white;
    border-color: #28a745;
}

.cookie-consent-accept input[type="submit"]:hover {
    background-color: #218838;
    border-color: #218838;
}

/* Decline button style (Secondary Action - Outline) */
.cookie-consent-decline input[type="submit"] {
    background-color: transparent;
    color: #6c757d; /* Bootstrap's secondary grey */
    border-color: #6c757d;
}

.cookie-consent-decline input[type="submit"]:hover {
    background-color: #6c757d;
    color: white;
}

/* Status text styles */
.cookie-consent-accepted,
.cookie-consent-declined {
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.cookie-consent-accepted {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.cookie-consent-declined {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Table styling */
.cookie-group table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Prevent content from overflowing the cell */
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.cookie-group th,
.cookie-group td {
    /* テキストを強制的に折り返し、必要に応じて単語を分割する */
    overflow-wrap: break-word;
    word-wrap: break-word; /* For older browser compatibility */
    word-break: break-all; /* より強力な単語の改行 */
    white-space: normal !important; /* 他のスタイルによる改行無効化を強制的に上書き */
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top; /* 折り返し時の可読性向上のため、内容を上揃えにする */
}

.cookie-group th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: bold;
    width: 30%; /* ヘッダー列に幅を固定で割り当てる */
}

