/* Simplified Fabric UI CSS for Office Add-ins */
/* This is a minimal implementation of key Fabric UI components */

/* Reset and base */
* {
    box-sizing: border-box;
}

/* Fabric base styles */
.ms-Fabric {
    color: #323130;
    font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    font-size: 14px;
    font-weight: 400;
}

/* Typography */
.ms-fontSize-10 { font-size: 10px; }
.ms-fontSize-12 { font-size: 12px; }
.ms-fontSize-14 { font-size: 14px; }
.ms-fontSize-16 { font-size: 16px; }
.ms-fontSize-18 { font-size: 18px; }
.ms-fontSize-20 { font-size: 20px; }
.ms-fontSize-24 { font-size: 24px; }
.ms-fontSize-28 { font-size: 28px; }
.ms-fontSize-32 { font-size: 32px; }
.ms-fontSize-42 { font-size: 42px; }

.ms-fontWeight-regular { font-weight: 400; }
.ms-fontWeight-semibold { font-weight: 600; }
.ms-fontWeight-bold { font-weight: 700; }

/* Colors */
.ms-fontColor-themePrimary { color: #0078d4; }
.ms-fontColor-themeSecondary { color: #2b88d8; }
.ms-fontColor-themeDarker { color: #005a9e; }
.ms-fontColor-neutralPrimary { color: #323130; }
.ms-fontColor-neutralSecondary { color: #605e5c; }
.ms-fontColor-neutralTertiary { color: #a19f9d; }

.ms-bgColor-themePrimary { background-color: #0078d4; }
.ms-bgColor-themeSecondary { background-color: #2b88d8; }
.ms-bgColor-themeDarker { background-color: #005a9e; }
.ms-bgColor-neutralLighter { background-color: #f3f2f1; }
.ms-bgColor-neutralLight { background-color: #edebe9; }
.ms-bgColor-neutralQuaternaryAlt { background-color: #e1dfdd; }
.ms-bgColor-white { background-color: #ffffff; }

/* Spacing */
.ms-u-padding4 { padding: 4px; }
.ms-u-padding8 { padding: 8px; }
.ms-u-padding12 { padding: 12px; }
.ms-u-padding16 { padding: 16px; }
.ms-u-padding20 { padding: 20px; }
.ms-u-padding24 { padding: 24px; }

.ms-u-margin4 { margin: 4px; }
.ms-u-margin8 { margin: 8px; }
.ms-u-margin12 { margin: 12px; }
.ms-u-margin16 { margin: 16px; }
.ms-u-margin20 { margin: 20px; }
.ms-u-margin24 { margin: 24px; }

/* Flexbox utilities */
.ms-u-flex { display: flex; }
.ms-u-flexColumn { flex-direction: column; }
.ms-u-flexRow { flex-direction: row; }
.ms-u-flexWrap { flex-wrap: wrap; }
.ms-u-flexNoWrap { flex-wrap: nowrap; }
.ms-u-justifyContentCenter { justify-content: center; }
.ms-u-justifyContentSpaceBetween { justify-content: space-between; }
.ms-u-alignItemsCenter { align-items: center; }
.ms-u-alignItemsStart { align-items: flex-start; }
.ms-u-alignItemsEnd { align-items: flex-end; }

/* Text alignment */
.ms-u-textAlignLeft { text-align: left; }
.ms-u-textAlignCenter { text-align: center; }
.ms-u-textAlignRight { text-align: right; }

/* Button base */
.ms-Button {
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    font-weight: 400;
    border-width: 1px;
    border-style: solid;
    border-color: #8a8886;
    border-radius: 2px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    padding: 0 16px;
    text-decoration: none;
    text-align: center;
    min-height: 32px;
    background-color: #ffffff;
    color: #323130;
    user-select: none;
    outline: transparent;
    position: relative;
    font-family: inherit;
    transition: all 0.1s ease;
}

.ms-Button:hover {
    background-color: #f3f2f1;
    color: #201f1e;
}

.ms-Button:focus {
    outline: 1px solid #605e5c;
    outline-offset: 2px;
}

.ms-Button:active {
    background-color: #edebe9;
    color: #201f1e;
}

.ms-Button[disabled] {
    background-color: #f3f2f1;
    border-color: #f3f2f1;
    color: #a19f9d;
    cursor: default;
    pointer-events: none;
}

.ms-Button--primary {
    background-color: #0078d4;
    border-color: #0078d4;
    color: #ffffff;
}

.ms-Button--primary:hover {
    background-color: #106ebe;
    border-color: #106ebe;
    color: #ffffff;
}

.ms-Button--primary:active {
    background-color: #005a9e;
    border-color: #005a9e;
    color: #ffffff;
}

.ms-Button--primary[disabled] {
    background-color: #f3f2f1;
    border-color: #f3f2f1;
    color: #a19f9d;
}

/* TextField */
.ms-TextField {
    font-family: inherit;
    margin-bottom: 8px;
}

.ms-TextField-label {
    font-size: 14px;
    font-weight: 600;
    color: #323130;
    padding: 0 0 5px 0;
    display: inline-block;
}

.ms-TextField-fieldGroup {
    position: relative;
}

.ms-TextField-field {
    font-size: 14px;
    border-radius: 2px;
    border: 1px solid #605e5c;
    background: #ffffff;
    color: #323130;
    height: 32px;
    line-height: 30px;
    padding: 0 8px;
    width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
    outline: 0;
    font-family: inherit;
}

.ms-TextField-field:focus {
    border-color: #0078d4;
}

.ms-TextField-field::placeholder {
    color: #605e5c;
}

.ms-TextField-field[disabled] {
    background-color: #f3f2f1;
    border-color: #f3f2f1;
    pointer-events: none;
    cursor: default;
}

.ms-TextField--multiline .ms-TextField-field {
    height: auto;
    line-height: 17px;
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: 60px;
    resize: none;
}

/* Spinner */
.ms-Spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ms-Spinner-circle {
    box-sizing: border-box;
    border-radius: 50%;
    border: 1.5px solid #c7e0f4;
    border-top-color: #0078d4;
    animation: ms-Spinner-spin 1.3s infinite cubic-bezier(0.53, 0.21, 0.29, 0.67);
}

.ms-Spinner--xSmall .ms-Spinner-circle {
    width: 12px;
    height: 12px;
}

.ms-Spinner--small .ms-Spinner-circle {
    width: 16px;
    height: 16px;
}

.ms-Spinner--medium .ms-Spinner-circle {
    width: 20px;
    height: 20px;
}

.ms-Spinner--large .ms-Spinner-circle {
    width: 28px;
    height: 28px;
}

.ms-Spinner-label {
    color: #0078d4;
    font-size: 14px;
    font-weight: 400;
    margin-top: 10px;
}

@keyframes ms-Spinner-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* MessageBar */
.ms-MessageBar {
    background: #f3f2f1;
    border: 1px solid #edebe9;
    border-radius: 2px;
    color: #323130;
    display: flex;
    font-size: 14px;
    min-height: 32px;
    padding: 8px 12px;
    position: relative;
    word-wrap: break-word;
}

.ms-MessageBar--error {
    background: #fef7f7;
    border-color: #f1707b;
}

.ms-MessageBar--blocked {
    background: #fef7f7;
    border-color: #f1707b;
}

.ms-MessageBar--severeWarning {
    background: #fef7f7;
    border-color: #f1707b;
}

.ms-MessageBar--warning {
    background: #fffcf1;
    border-color: #f7d22e;
}

.ms-MessageBar--success {
    background: #f1faf1;
    border-color: #57a300;
}

.ms-MessageBar--info {
    background: #f1f7fc;
    border-color: #c7e0f4;
}

.ms-MessageBar-content {
    display: flex;
    width: 100%;
}

.ms-MessageBar-icon {
    font-size: 16px;
    min-width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    flex-shrink: 0;
}

.ms-MessageBar-text {
    font-size: 14px;
    line-height: 16px;
    display: block;
    flex-grow: 1;
}

/* Panel */
.ms-Panel {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1000000;
}

.ms-Panel-main {
    background: #ffffff;
    bottom: 0;
    box-shadow: 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108);
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    width: 340px;
}

.ms-Panel-header {
    padding: 14px 24px 14px 24px;
    border-bottom: 1px solid #edebe9;
}

.ms-Panel-headerText {
    color: #323130;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.ms-Panel-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 24px 20px;
}

.ms-Panel-footer {
    border-top: 1px solid #edebe9;
    flex-shrink: 0;
    padding: 16px 24px;
}

/* Grid */
.ms-Grid {
    box-sizing: border-box;
    display: block;
    padding: 0;
    margin: 0;
}

.ms-Grid-row {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.ms-Grid-col {
    box-sizing: border-box;
    flex-shrink: 0;
    padding: 0 12px;
    min-height: 1px;
}

.ms-sm1 { flex: 0 0 8.33333333%; max-width: 8.33333333%; }
.ms-sm2 { flex: 0 0 16.66666667%; max-width: 16.66666667%; }
.ms-sm3 { flex: 0 0 25%; max-width: 25%; }
.ms-sm4 { flex: 0 0 33.33333333%; max-width: 33.33333333%; }
.ms-sm5 { flex: 0 0 41.66666667%; max-width: 41.66666667%; }
.ms-sm6 { flex: 0 0 50%; max-width: 50%; }
.ms-sm7 { flex: 0 0 58.33333333%; max-width: 58.33333333%; }
.ms-sm8 { flex: 0 0 66.66666667%; max-width: 66.66666667%; }
.ms-sm9 { flex: 0 0 75%; max-width: 75%; }
.ms-sm10 { flex: 0 0 83.33333333%; max-width: 83.33333333%; }
.ms-sm11 { flex: 0 0 91.66666667%; max-width: 91.66666667%; }
.ms-sm12 { flex: 0 0 100%; max-width: 100%; }

/* Icon base */
.ms-Icon {
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-family: 'FabricMDL2Icons';
    font-style: normal;
    font-weight: normal;
    speak: none;
}

/* Link */
.ms-Link {
    color: #0078d4;
    text-decoration: none;
    cursor: pointer;
}

.ms-Link:hover {
    color: #004578;
    text-decoration: underline;
}

.ms-Link:focus {
    color: #004578;
    text-decoration: underline;
}

.ms-Link[disabled] {
    color: #a19f9d;
    cursor: default;
    pointer-events: none;
}

/* List */
.ms-List {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.ms-List-item {
    display: block;
    line-height: 1;
    padding: 9px 0;
    position: relative;
}

/* Responsive breakpoints */
@media (max-width: 479px) {
    .ms-hiddenSm { display: none !important; }
}

@media (min-width: 480px) and (max-width: 639px) {
    .ms-hiddenMd { display: none !important; }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .ms-hiddenLg { display: none !important; }
}

@media (min-width: 1024px) and (max-width: 1365px) {
    .ms-hiddenXl { display: none !important; }
}

@media (min-width: 1366px) and (max-width: 1919px) {
    .ms-hiddenXxl { display: none !important; }
}

@media (min-width: 1920px) {
    .ms-hiddenXxxl { display: none !important; }
}